NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/38670: ^Z does not work anymore for this program.



>Number:         38670
>Category:       kern
>Synopsis:       ^Z does not seems to suspend programs that vfork'ed and wait.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 15 20:50:00 +0000 2008
>Originator:     Christos Zoulas
>Release:        NetBSD 4.99.62
>Organization:
        Slobs 'R' US
>Environment:
System: NetBSD mx4.twosigma.com 4.99.62 NetBSD 4.99.62 (CRUSOE.debug) #0: Fri 
May  2 16:07:49 EDT 2008  
sdegler%crusoe.degler.net@localhost:/vol1/NetBSD/kernels/CRUSOE.debug amd64

Architecture: amd64
Machine: amd64
>Description:
        Hitting ^Z has no effect on the following program. Other tty signals
        work.
>How-To-Repeat:

#include <stdio.h>
#include <errno.h>
#include <stdlib.h>

main(argc, argv)
int argc;
char *argv[];
{
    int i, load;
    if (argc != 2 || sscanf(argv[1], "%d", &load) != 1) {
        (void) fprintf(stderr, "Usage: %s <load-value>.\n", argv[0]);
        exit(0);
    }

    for ( i = 0; i < load; i++ )
        switch (vfork()) {
        case 0:
            /* The child */
            break;
        case -1:
            (void) fprintf(stderr, "%s: Vfork failed (%s).\n", argv[0], 
                strerror(errno));
            exit(errno);
        default:
            wait((int *) 0);
            break;
        }
    sleep(100000);
    exit(0);
}
        
>Fix:
        ?



Home | Main Index | Thread Index | Old Index