version 1.15, 2004/09/15 22:21:40 |
version 1.16, 2009/07/28 16:05:04 |
|
|
} |
} |
|
|
/* |
/* |
* Interactively dump core on "core" |
|
*/ |
|
int |
|
core(void *v) |
|
{ |
|
pid_t pid; |
|
extern int wait_status; |
|
|
|
switch (pid = vfork()) { |
|
case -1: |
|
warn("vfork"); |
|
return(1); |
|
case 0: |
|
abort(); |
|
_exit(1); |
|
} |
|
fputs("Okie dokie", stdout); |
|
fflush(stdout); |
|
wait_child(pid); |
|
if (WIFSIGNALED(wait_status) && WCOREDUMP(wait_status)) |
|
puts(" -- Core dumped."); |
|
else |
|
puts(" -- Can't dump core."); |
|
return(0); |
|
} |
|
|
|
/* |
|
* Add the given header fields to the retained list. |
* Add the given header fields to the retained list. |
* If no arguments, print the current list of retained fields. |
* If no arguments, print the current list of retained fields. |
*/ |
*/ |