X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Frcvtty.c;h=74d19d5d641948f9446b238d9866a89b30ba3a6d;hb=f77270883363b2407ba4588e20ab697535d45c50;hp=333a3b2fe737dd982b8b68ee6e15a6532e000a87;hpb=2f689a1cb907a5de04e6d39ffd217a69af3216c7;p=mmh diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 333a3b2..74d19d5 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -2,8 +2,6 @@ /* * rcvtty.c -- a rcvmail program (a lot like rcvalert) handling IPC ttys * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -80,7 +78,7 @@ char *getusername(void); /* * static prototypes */ -static RETSIGTYPE alrmser (int); +static void alrmser (int); static int message_fd (char **); static int header_fd (void); static void alert (char *, int); @@ -206,12 +204,10 @@ main (int argc, char **argv) } -static RETSIGTYPE +static void alrmser (int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL (SIGALRM, alrmser); -#endif + NMH_UNUSED (i); longjmp (myctx, 1); } @@ -225,13 +221,7 @@ message_fd (char **vec) char tmpfil[BUFSIZ]; struct stat st; -#ifdef HAVE_MKSTEMP fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil))); -#else - unlink (mktemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)))); - if ((fd = open (tmpfil, O_RDWR | O_CREAT | O_TRUNC, 0600)) == NOTOK) - return header_fd (); -#endif unlink (tmpfil); if ((child_id = vfork()) == NOTOK) { @@ -265,7 +255,7 @@ message_fd (char **vec) * Ruthlessly kill the child and anything * else in its process group. */ - KILLPG(child_id, SIGKILL); + killpg(child_id, SIGKILL); } close (fd); return header_fd ();