projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
define new library function getgrouplist
[unix-history]
/
usr
/
src
/
lib
/
libc
/
gen
/
psignal.c
diff --git
a/usr/src/lib/libc/gen/psignal.c
b/usr/src/lib/libc/gen/psignal.c
index
eff088a
..
4020b7b
100644
(file)
--- a/
usr/src/lib/libc/gen/psignal.c
+++ b/
usr/src/lib/libc/gen/psignal.c
@@
-6,20
+6,21
@@
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)psignal.c 5.
4
(Berkeley) %G%";
+static char sccsid[] = "@(#)psignal.c 5.
6
(Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
/*
* Print the name of the signal indicated
* along with the supplied message.
*/
#endif /* LIBC_SCCS and not lint */
/*
* Print the name of the signal indicated
* along with the supplied message.
*/
-#include <signal.h>
-
-extern char *sys_siglist[];
+#include <s
ys/s
ignal.h>
+#include <string.h>
+#include <unistd.h>
+void
psignal(sig, s)
unsigned int sig;
psignal(sig, s)
unsigned int sig;
- char *s;
+ c
onst c
har *s;
{
register char *c;
register int n;
{
register char *c;
register int n;
@@
-30,9
+31,9
@@
psignal(sig, s)
c = "Unknown signal";
n = strlen(s);
if (n) {
c = "Unknown signal";
n = strlen(s);
if (n) {
- (void)write(
2
, s, n);
- (void)write(
2
, ": ", 2);
+ (void)write(
STDERR_FILENO
, s, n);
+ (void)write(
STDERR_FILENO
, ": ", 2);
}
}
- (void)write(
2
, c, strlen(c));
- (void)write(
2
, "\n", 1);
+ (void)write(
STDERR_FILENO
, c, strlen(c));
+ (void)write(
STDERR_FILENO
, "\n", 1);
}
}