Use of the KILL command while the GEM5 emulator is running

Source: Internet
Author: User
Tags telnet program

In the development of Linux under the GEM5 program, you need to start GEM5, and then use Telnet to connect the GEM5 to see the serial port information. Because of the number of steps, so write a script to run GEM5 and Telnet program, and two programs to listen, after any one exit, the other will also exit.

Originally, the Termination commands for two processes used kill-9 to exit. However, in the course of use, it is found that after the GEM5 run, sometimes stats.txt files are generated, sometimes not. After analysis, it is found that only the first exit GEM5, the Stats.txt file will be generated.

Analysis of the phenomenon, concluded: GEM5 need to use CTRL + C to exit, using kill-9 to exit will affect the production of stats.txt log. After querying, CTRL + C sends the signal number 2, and all the Kill commands signal as follows:

[Email protected] ~$ kill-l 1) SIGHUP 2) SIGINT 3) Sigquit 4) Sigill 5) SIGTRAP 6) SIGABRT 7) Sigemt 8) SIGFPE 9) SIGKILL  SIGBUS11) SIGSEGV12) SIGSYS13) SIGPIPE14) SIGALRM15) SIGTERM16) SIGURG17) SIGSTOP18) SIGTSTP19) SIGCONT20) SIGCHLD21) SIGTTIN22) SIGTTOU23) SIGIO24) SIGXCPU25) SIGXFSZ26) SIGVTALRM27) SIGPROF28) SIGWINCH29) SIGINFO30) SIGUSR131) SIGUSR2

Therefore, modify the script to determine if Telnet has exited, then use Kill-s SIGINT ${pid} to exit the GEM5, you can normally get to the Stats.txt file.

Use of the KILL command while the GEM5 emulator is running

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.