Mercurial > aewl
comparison util.c @ 138:c1185dc7a36e
some cleanups/fixes inspired by Jukka Salmi's feedback
author | arg@10ksloc.org |
---|---|
date | Fri, 21 Jul 2006 18:34:10 +0200 |
parents | 61490330e90a |
children | 21071ae1fe68 |
comparison
equal
deleted
inserted
replaced
137:77922a389fa8 | 138:c1185dc7a36e |
---|---|
13 /* static */ | 13 /* static */ |
14 | 14 |
15 static void | 15 static void |
16 bad_malloc(unsigned int size) | 16 bad_malloc(unsigned int size) |
17 { | 17 { |
18 fprintf(stderr, "fatal: could not malloc() %d bytes\n", | 18 eprint("fatal: could not malloc() %u bytes\n", size); |
19 (int) size); | |
20 exit(EXIT_FAILURE); | |
21 } | 19 } |
22 | 20 |
23 /* extern */ | 21 /* extern */ |
24 | 22 |
25 void * | 23 void * |
56 setsid(); | 54 setsid(); |
57 execvp(argv[0], argv); | 55 execvp(argv[0], argv); |
58 fprintf(stderr, "dwm: execvp %s", argv[0]); | 56 fprintf(stderr, "dwm: execvp %s", argv[0]); |
59 perror(" failed"); | 57 perror(" failed"); |
60 } | 58 } |
61 exit(EXIT_FAILURE); | 59 exit(0); |
62 } | 60 } |
63 wait(0); | 61 wait(0); |
64 } | 62 } |