projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed HAVE_STRUCT_TM_TM_GMTOFF support because it didn't work on Cygwin and isn...
[mmh]
/
uip
/
rcvtty.c
diff --git
a/uip/rcvtty.c
b/uip/rcvtty.c
index
8b04d61
..
8ce068d
100644
(file)
--- a/
uip/rcvtty.c
+++ b/
uip/rcvtty.c
@@
-78,7
+78,7
@@
char *getusername(void);
/*
* static prototypes
*/
/*
* 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);
static int message_fd (char **);
static int header_fd (void);
static void alert (char *, int);
@@
-204,12
+204,10
@@
main (int argc, char **argv)
}
}
-static RETSIGTYPE
+static void
alrmser (int i)
{
alrmser (int i)
{
-#ifndef RELIABLE_SIGNALS
- SIGNAL (SIGALRM, alrmser);
-#endif
+ NMH_UNUSED (i);
longjmp (myctx, 1);
}
longjmp (myctx, 1);
}
@@
-219,17
+217,12
@@
static int
message_fd (char **vec)
{
pid_t child_id;
message_fd (char **vec)
{
pid_t child_id;
- int bytes, fd, seconds;
+ int bytes, seconds;
+ volatile int fd;
char tmpfil[BUFSIZ];
struct stat st;
char tmpfil[BUFSIZ];
struct stat st;
-#ifdef HAVE_MKSTEMP
fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)));
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) {
unlink (tmpfil);
if ((child_id = vfork()) == NOTOK) {
@@
-263,7
+256,7
@@
message_fd (char **vec)
* Ruthlessly kill the child and anything
* else in its process group.
*/
* Ruthlessly kill the child and anything
* else in its process group.
*/
- KILLPG(child_id, SIGKILL);
+ killpg(child_id, SIGKILL);
}
close (fd);
return header_fd ();
}
close (fd);
return header_fd ();