Comment 27 for bug 407428

Revision history for this message
Wisefox (shangxiaole) wrote : Re: sshd zombie processes and strange behavior after karmic upgrade

Well. Provide a piece of code as a workaround. compile the following C code:
========================
#include "signal.h"

int main( int argc, char ** argv )
{

        sigset_t oldset, newset;
        sigfillset( &newset );
        sigprocmask( SIG_UNBLOCK, &newset, &oldset );
        int pid = fork();
        if ( pid == 0 )
        {
                execvp( argv[1], &(argv[1]) );
                perror("\n");
        }
        else
        {
                printf("father return;\n");
        }
}
=========================
gcc -o sigwapper thisfile.c
=========================
Use the program to fix the problem as workaround. need root privilege :
=========================
$ ./sigwapper /etc/init.d/ssh restart
=========================
Check if the C + c is back or not.