author | viric@llimona |
Mon, 24 Sep 2007 13:59:40 +0200 | |
changeset 38 | f1e581c862d5 |
parent 26 | 96920c3707b3 |
child 53 | 07500c5c53cb |
permissions | -rw-r--r-- |
12 | 1 |
/* |
2 |
stdin mix - a mixer/multiplexer for stdin to processes |
|
3 |
Copyright (C) 2007 LluĂs Batlle i Rossell |
|
4 |
||
5 |
Please find the license in the provided COPYING file. |
|
6 |
*/ |
|
0 | 7 |
#include <stdio.h> |
8 |
#include <stdlib.h> |
|
14 | 9 |
#include <stdarg.h> |
10 |
#include <string.h> |
|
11 |
#include <errno.h> |
|
0 | 12 |
|
3 | 13 |
#include "main.h" |
0 | 14 |
|
14 | 15 |
void error(const char *msg, ...) |
0 | 16 |
{ |
14 | 17 |
va_list v; |
18 |
||
19 |
va_start(v, msg); |
|
20 |
vfprintf(stderr, msg, v); |
|
21 |
putc('\n', stderr); |
|
22 |
fprintf(stderr, " errno %i: %s\n", errno, strerror(errno)); |
|
26
96920c3707b3
Unix sockets version works! Well, signals don't. :)
viric@llimona
parents:
21
diff
changeset
|
23 |
finish(-1); |
0 | 24 |
} |
25 |
||
21 | 26 |
void not_implemented(const char *msg, ...) |
27 |
{ |
|
28 |
va_list v; |
|
29 |
||
30 |
va_start(v, msg); |
|
31 |
fprintf(stderr, "Not implemented: "); |
|
32 |
vfprintf(stderr, msg, v); |
|
33 |
putc('\n', stderr); |
|
34 |
fprintf(stderr, " errno %i: %s\n", errno, strerror(errno)); |
|
26
96920c3707b3
Unix sockets version works! Well, signals don't. :)
viric@llimona
parents:
21
diff
changeset
|
35 |
finish(-1); |
21 | 36 |
} |