diff options
author | Jim Meyering <jim@meyering.net> | 2002-11-10 09:44:05 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-11-10 09:44:05 +0000 |
commit | bd03362ebb4f4ba444e4af89140cec350b7eff60 (patch) | |
tree | ae358654bb1081715eadfc737efb097dfe86b514 /lib | |
parent | b52870d14fcd7c325fd872a2cd60b03a35cdbfc8 (diff) | |
download | coreutils-bd03362ebb4f4ba444e4af89140cec350b7eff60.tar.xz |
*** empty log message ***
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ChangeLog | 4 | ||||
-rw-r--r-- | lib/raise.c | 33 |
2 files changed, 37 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index af76690c4..5ea90eb0b 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2002-11-10 Jim Meyering <jim@meyering.net> + + * raise.c: New file. + 2002-11-08 Paul Eggert <eggert@twinsun.com> * human.c (human_readable): Revamp to avoid warning about unused diff --git a/lib/raise.c b/lib/raise.c new file mode 100644 index 000000000..5a6e0e62d --- /dev/null +++ b/lib/raise.c @@ -0,0 +1,33 @@ +/* Provide a non-threads replacement for the POSIX raise function. + Copyright (C) 2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* written by Jim Meyering */ + +#include <config.h> + +/* Undefine raise here so any system prototype is not redefined + to be a prototype for rpl_raise. */ +#undef raise + +#include <sys/types.h> +#include <signal.h> + +int +rpl_raise (int sig) +{ + kill (getpid (), sig) +} |