Re: DPKG not compiling due to differences between Alpha and Intel...
ian@chiark.chu.cam.ac.uk (Ian Jackson) wrote on 24.01.96 in <[🔎] m0teupl-0002YUC@chiark.chu.cam.ac.uk>:
> Does anyone know what POSIX says on this issue ?
I mislaid my original POSIX.1, but the very reliable "The POSIX.1 Standard
- A Programmers Guide" says that Posix has
struct sigaction {
void (*sa_handler)(); /* Signal handler function */
sigset_t sa_mask; /* Extra mask during handling */
int sa_flags; /* Only used for SIGCHLD */
/* Possibly other members */
};
and in their example of "a strictly POSIX conforming program" they
initialize a new struct sigaction by initializing only these three
members.
This seems to be a general POSIX (and ANSI C) philosophy: as long as you
only use POSIX interfaces, you can safely ignore any members an
implementation might add to a structure.
Now if libc implements this correctly is a completely different question!
However, if you absolutely want to be on the safe side, you might simply
memset(my_sigaction, 0, sizeof(my_sigaction)); - I don't believe there's
anything wrong with that.
MfG Kai
Reply to: