[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kill -19 and kill -18
From: |
Salvatore Valente |
Subject: |
Re: kill -19 and kill -18 |
Date: |
Sat, 9 Dec 2000 16:11:56 -0500 (EST) |
You wrote that the sleep command exits when sent a CONT signal.
This is because the sleep(1) command is uses the sleep(3) function
call. Here's the relevant part of Linux's sleep(3) man page:
sleep() makes the current process sleep until _seconds_ seconds
have elapsed or a signal arrives which is not ignored.
I guess this could be considered a bug in the sleep(1) command, or in
Linux's sleep(3) function, or not a bug at all.
Just to see if I could, I wrote a sleep(1) command that deals with
SUSP and CONT signals on Linux. It's attached.
Have a nice day,
Sal.
#include <sys/time.h>
#include <sys/select.h>
int main (int argc, char *argv[])
{
struct timeval tv;
tv.tv_sec = atoi (argv[1]);
tv.tv_usec = 0;
return select (0, NULL, NULL, NULL, &tv);
}