Loading ...
Sorry, an error occurred while loading the content.
 

Re: SIGQUIT interrupt in Linux ?

Expand Messages
  • Chandrashekar Babu
    ... Try the Ctrl+ key :-) Cheers, Chandrashekar Babu
    Message 1 of 6 , Oct 30, 2004
      ajith kumar writes:

      > What is the key combination that generates the
      > SIGQUIT interrupt in Linux ?
      > like ctrl+C for SIGINT

      Try the Ctrl+\ key :-)

      Cheers,
      Chandrashekar Babu
    • ajith kumar
      ... Chandrashekar Babu wrote Try the Ctrl+ key :-) ... ajith kumar writes: I tried it but not working in RedHat Fedora 1. here is the program ... #include
      Message 2 of 6 , Oct 31, 2004
        ---------------------------------
        ajith kumar writes:

        > What is the key combination that generates the
        > SIGQUIT interrupt in Linux ?
        > like ctrl+C for SIGINT
        -------------------------------------
        Chandrashekar Babu wrote
        Try the Ctrl+\ key :-)
        -------------------------------------
        ajith kumar writes:
        I tried it but not working in RedHat Fedora 1.
        here is the program
        -------------------------------------
        #include <signal.h>
        void abc(int signo);
        main()
        {
        printf("press key for SIGQUIT\n");
        signal(SIGQUIT,abc);
        for(;;);

        }
        void abc(int signo)
        {
        printf("%d :- signo",signo);
        }

        I am unable to trap the signal by ctrl+\
        ------------------------------------------------







        --
        Before posting to this list, read the list rules
        FIRST!

        http://linux-bangalore.org/discussions/rules.php



        Yahoo! Groups Sponsor ADVERTISEMENT


        ---------------------------------
        Yahoo! Groups Links

        To visit your group on the web, go to:
        http://groups.yahoo.com/group/linux-bangalore-programming/

        To unsubscribe from this group, send an email to:
        linux-bangalore-programming-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo!
        Terms of Service.





        __________________________________
        Do you Yahoo!?
        Yahoo! Mail Address AutoComplete - You start. We finish.
        http://promotions.yahoo.com/new_mail
      • Chandrashekar Babu
        ... Replace the above statement with this -- printf( %d :- signo n , signo); Try the program now and let me know if it didn t work as expected. Cheers,
        Message 3 of 6 , Oct 31, 2004
          ajith kumar writes:

          > printf("%d :- signo",signo);

          Replace the above statement with this --> printf("%d :- signo\n", signo);

          Try the program now and let me know if it didn't work as expected.

          Cheers,
          Chandrashekar Babu.
        • ajith kumar
          ... Chandrasekhar babu writes ... Ajith writes, it is working now.Canu please tell me how it is working if a new line ( n) is given ? -- Before posting to this
          Message 4 of 6 , Oct 31, 2004
            ajith kumar writes:

            > printf("%d :- signo",signo);


            Chandrasekhar babu writes
            >>Replace the above statement with this --> >>printf("%d :- signo\n", signo);

            Ajith writes,

            it is working now.Canu please tell me

            how it is working if a new line (\n) is given ?




            --
            Before posting to this list, read the list rules FIRST!

            http://linux-bangalore.org/discussions/rules.php




            Yahoo! Groups SponsorADVERTISEMENT


            ---------------------------------
            Yahoo! Groups Links

            To visit your group on the web, go to:
            http://groups.yahoo.com/group/linux-bangalore-programming/

            To unsubscribe from this group, send an email to:
            linux-bangalore-programming-unsubscribe@yahoogroups.com

            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




            ---------------------------------
            Do you Yahoo!?
            Yahoo! Mail - You care about security. So do we.

            [Non-text portions of this message have been removed]
          • Ganesan R
            ... We ll leave that as an excercise for you to figure out. Hint: It was always working (even without the newline). Ganesan
            Message 5 of 6 , Nov 1, 2004
              >>>>> "ajith" == ajith kumar <ajith_stalwarts@...> writes:

              > it is working now.Canu please tell me
              > how it is working if a new line (\n) is given ?

              We'll leave that as an excercise for you to figure out. Hint: It was always
              working (even without the newline).

              Ganesan
            • Chandrashekar Babu
              ... Previously, your program did work... but as the default standard output is generally buffered on Linux (or any UNIX for that matter), the output never
              Message 6 of 6 , Nov 1, 2004
                ajith kumar writes:

                > it is working now.Canu please tell me
                >
                > how it is working if a new line (\n) is given ?

                Previously, your program did work... but as the default standard output is
                generally buffered on Linux (or any UNIX for that matter), the output never
                appeared from the printf() function. However, adding a newline character in
                output flushes the buffer thus forcing all pending output to be sent to
                screen in effect. You can also use the fflush() function to achieve the
                same.

                Cheers,
                Chandrashekar Babu.
              Your message has been successfully submitted and would be delivered to recipients shortly.