#include <fcntl.h>
#include <h/signals.h>
#include <h/md5.h>
-#include <errno.h>
#include <setjmp.h>
-#include <signal.h>
#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
-#include <sys/wait.h>
extern int debugsw;
fflush (stdout);
- for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
switch (ct->c_type) {
case CT_MULTIPART:
return show_multi (ct, serial, alternate);
- break;
case CT_MESSAGE:
switch (ct->c_subtype) {
case MESSAGE_PARTIAL:
return show_partial (ct, serial, alternate);
- break;
case MESSAGE_EXTERNAL:
return show_external (ct, serial, alternate);
- break;
case MESSAGE_RFC822:
default:
return show_message_rfc822 (ct, serial, alternate);
- break;
}
- break;
case CT_TEXT:
return show_text (ct, serial, alternate);
- break;
case CT_AUDIO:
case CT_IMAGE:
case CT_VIDEO:
case CT_APPLICATION:
return show_content (ct, serial, alternate);
- break;
default:
adios (NULL, "unknown content type %d", ct->c_type);
- break;
}
return 0; /* NOT REACHED */
fflush (stdout);
- for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
*/
if (!alternate || ct->c_subtype == TEXT_PLAIN) {
snprintf (buffer, sizeof(buffer), "%%p%s '%%F'", progsw ? progsw :
- moreproc && *moreproc ? moreproc : "more");
+ moreproc && *moreproc ? moreproc : DEFAULT_PAGER);
cp = (ct->c_showproc = add (buffer, NULL));
return show_content_aux (ct, serial, alternate, cp, NULL);
}