From: Jim Meyering Date: Sun, 10 Nov 2002 09:44:05 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: v4.5.4~269 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd03362ebb4f4ba444e4af89140cec350b7eff60;p=thirdparty%2Fcoreutils.git *** empty log message *** --- diff --git a/lib/ChangeLog b/lib/ChangeLog index af76690c49..5ea90eb0b2 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2002-11-10 Jim Meyering + + * raise.c: New file. + 2002-11-08 Paul Eggert * 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 0000000000..5a6e0e62d4 --- /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 + +/* Undefine raise here so any system prototype is not redefined + to be a prototype for rpl_raise. */ +#undef raise + +#include +#include + +int +rpl_raise (int sig) +{ + kill (getpid (), sig) +}