One of many newbie questions from me... Cant find the info I'm looking for.
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym?
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym?
From the C11 draft standard (yes, I know, but that's the most current I have)
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that
signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, seem to specify exactly _why_ SIG_DFL is named that way. Presumably because other abbreviations would somehow conflict or possibly be confused with existing nomenclature (SIGUSR1 and SIGUSR2, for instance, are user-DEFined signals, and SIG_DEF might confuse someone who isn't entirely familiar with the nomenclature), or because (like many abbreviations in Unix, "DeFauLt" made more sense to someone.
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym?
From the C11 draft standard (yes, I know, but that's the most current I have)
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that
signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, seem to specify exactly _why_ SIG_DFL is named that way.
On 2025-11-08, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>>From the C11 draft standard (yes, I know, but that's the most current I have)
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym? >>
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that >> signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, >> seem to specify exactly _why_ SIG_DFL is named that way.
It's not named SIGNAL_DEFAULT probably in order to harmonize with
strpbrk, which is not named string_pointer_to_break.
Programmers long ago loved creating "bumper stumpers" by removing
vowels and some consontants too.
I agree with them; I positively never want to write shit like
#include <standard_input_ouput.header>
or work in any tech stack where that is the norm.
The superfluous "std" should have been omitted from <stdio.h>; other standard headers do not carry a reminder that they are standard, like <string.h>, <math.h> or <assert.h>.
On Sat, 8 Nov 2025 19:28:20 -0000 (UTC), Lew Pitcher wrote:
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>>From the C11 draft standard (yes, I know, but that's the most current I have)
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym? >>
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that >> signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, >> seem to specify exactly _why_ SIG_DFL is named that way. Presumably because >> other abbreviations would somehow conflict or possibly be confused with
existing nomenclature (SIGUSR1 and SIGUSR2, for instance, are user-DEFined >> signals, and SIG_DEF might confuse someone who isn't entirely familiar with >> the nomenclature), or because (like many abbreviations in Unix, "DeFauLt"
made more sense to someone.
Thanks again Lew. I'm running with: [D]e[F]ault [L]evel in my // comments.
Thanks again Lew. I'm running with: [D]e[F]ault [L]evel in my // comments.
That is likely apocryphal; since L is present in "default", the
simplest hypothesis is that the L in DFL is that one.
The argument in question is a handler not a level. That has an L,
but not in the leading position, making the revised origin hypothesis [D]e[F]ault hand[L]ing is even more farfetched.
One of many newbie questions from me... Cant find the info I'm looking for.
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym?
(Pedantic quibble: It's not really an acronym, which is a word formed
from the initials of several words, like laser, radar, or scuba).
On Sat, 08 Nov 2025 14:57:35 -0800, Keith Thompson wrote:
(Pedantic quibble: It's not really an acronym, which is a word formed
from the initials of several words, like laser, radar, or scuba).
Mnemonic? I don't know...
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym?
From the C11 draft standard (yes, I know, but that's the most current I have)
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that
signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, >seem to specify exactly _why_ SIG_DFL is named that way.
or because (like many abbreviations in Unix, "DeFauLt"
made more sense to someone.
On 2025-11-08, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>>From the C11 draft standard (yes, I know, but that's the most current I have)
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym? >>
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that >> signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, >> seem to specify exactly _why_ SIG_DFL is named that way.
It's not named SIGNAL_DEFAULT probably in order to harmonize with
strpbrk, which is not named string_pointer_to_break.
Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>>From the C11 draft standard (yes, I know, but that's the most current I have) >>
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym? >>
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that
signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, >>seem to specify exactly _why_ SIG_DFL is named that way.
Signal _names_ use the 'SIG' prefix.
Signal _actions_ use an underscore (SIG_IGN, SIG_DFL, SIG_BLOCK, SIG_SETMASK, SIG_UNBLOCK). SIG_IGN, SIG_DFL values are defined such that they are unlikely to be
a valid program address on the target architectures (see PDP-11 definitions below).
The naming is defined, but not explicitly discussed in the SVID, Vol 1, Third Edition
signal(BA_OS) section (the third edition also introduced sigaction(2)).
or because (like many abbreviations in Unix, "DeFauLt"
made more sense to someone.
That seems most likely. DEF might appear to mean DEFine, to
those not familiar with Unix signals.
Unix v6 treated the handler address as "default action"
when the address value was 0, and an odd address
meant the same as SIG_IGN.
I presume that the signal names and SIG_ values were formalized
in Version 5, but have yet to see either the manpage or the
contents of /usr/include/signal.h from that version of Unix.
On Sun, 09 Nov 2025 21:46:55 +0000, Scott Lurndal wrote:
Neither the C standard, nor the Posix standards or Unix manuals before that, >>>seem to specify exactly _why_ SIG_DFL is named that way.
Signal _names_ use the 'SIG' prefix.
Signal _actions_ use an underscore (SIG_IGN, SIG_DFL, SIG_BLOCK, SIG_SETMASK,
SIG_UNBLOCK). SIG_IGN, SIG_DFL values are defined such that they are unlikely to be
a valid program address on the target architectures (see PDP-11 definitions below).
The naming is defined, but not explicitly discussed in the SVID, Vol 1, Third Edition
signal(BA_OS) section (the third edition also introduced sigaction(2)).
or because (like many abbreviations in Unix, "DeFauLt"
made more sense to someone.
That seems most likely. DEF might appear to mean DEFine, to
those not familiar with Unix signals.
Unix v6 treated the handler address as "default action"
when the address value was 0, and an odd address
meant the same as SIG_IGN.
Interestingly, the signal() function first appeared in AT&T Unix Version 4, >without <signal.h> and it's associated SIG* definitions.
(see https://dspinellis.github.io/unix-v4man/v4man.pdf)
Instead, the manual page for the signal() function states
signal(sig, func)
int (*func)();
...
In C, if func is 0 or 1, the action is as described above.[1]
If func is even, it is assumed to be the address of a function
entry point. When the signal occurs, the function will be called.
[1] in reference to the syscall, described previously, that stated
(of the syscall "value" argument, analogous to the C function "func")
"If value is 0, the default system action applies to the signal.
This is processes termination with or without a core dump. If
value is odd, the signal is ignored."
Interestingly, Version 4 Unix signal() depended on the knowledge
of the alignment of function code; valid functions were non-zero
addresses aligned to even byte boundaries, permitting the zero and >odd-address values to be used as metadata such as "use the default"
or "ignore this signal".
I presume that the signal names and SIG_ values were formalized
in Version 5, but have yet to see either the manpage or the
contents of /usr/include/signal.h from that version of Unix.
In article <10er3lt$3gj90$1@dont-email.me>,
Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
I presume that the signal names and SIG_ values were formalized
in Version 5, but have yet to see either the manpage or the
contents of /usr/include/signal.h from that version of Unix.
There's no mention of them even in the 6th edition manual, so presumably
they were introduced in 7th edition (which certainly had them).
Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
On Sat, 08 Nov 2025 19:01:00 +0000, Michael Sanders wrote:
One of many newbie questions from me... Cant find the info I'm looking for. >>>From the C11 draft standard (yes, I know, but that's the most current I have) >>
If SIG_IGN is an acronym for signal ignore, then what does DFL mean?
I've know (well I presume) it restores default behavior, but the acronym? >>
7.14.1.1 The signal function
2. ... If the value of func is SIG_DFL, default handling for that
signal will occur.
Neither the C standard, nor the Posix standards or Unix manuals before that, >>seem to specify exactly _why_ SIG_DFL is named that way.
Signal _names_ use the 'SIG' prefix.
Signal _actions_ use an underscore (SIG_IGN, SIG_DFL, SIG_BLOCK, SIG_SETMASK, >SIG_UNBLOCK). SIG_IGN, SIG_DFL values are defined such that they are unlikely to be
a valid program address on the target architectures (see PDP-11 definitions below).
The naming is defined, but not explicitly discussed in the SVID, Vol 1, Third Edition
signal(BA_OS) section (the third edition also introduced sigaction(2)).
or because (like many abbreviations in Unix, "DeFauLt"
made more sense to someone.
That seems most likely. DEF might appear to mean DEFine, to
those not familiar with Unix signals.
Unix v6 treated the handler address as "default action"
when the address value was 0, and an odd address
meant the same as SIG_IGN.
/ C library -- signal
/ signal(n, 0); /* default action on signal(n) */
/ signal(n, odd); /* ignore signal(n) */
/ signal(n, label); /* goto label on signal(n) */
/ returns old label, only one level.
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 14 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 237:53:05 |
| Calls: | 184 |
| Files: | 21,502 |
| Messages: | 82,415 |