• [^] # Re: busybox

    Posté par . En réponse au message Ctrl-c ne fonctionne pas. Évalué à 1.

    Désolé, je viens de tester et chezmoiçamarche.com . Juste pour être sûr, vérifie que le masque par défaut pour SIGINT était bien SIG_IGN (ignoré):

    #include <stdio.h>
    #include <signal.h>
    #include <unistd.h>

    typedef void (*sighandler_t)(int);

    int main (int argc, char *argv[])
    {
    ++argv;
    if (*argv) {
    sighandler_t hook = signal (SIGINT, SIG_DFL);
    if (hook==SIG_DFL)
    fprintf (stderr, "SIGINT handler was DFL\n");
    else if (hook==SIG_IGN)
    fprintf (stderr, "SIGINT handler was IGN\n");
    execvp (*argv, argv);
    }
    return 0;
    }

    Chez moi:
    # plop sh
    SIGINT handler was IGN


    BusyBox v0.60.4 (2003) Built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    #

    Si ça ne fonctionne pas, alors creuses l'autre piste du inittab.