2020年3月11日 星期三

How to get main() function return value in Linux terminal.

Sometimes we want to get the exit value of main() function, using the "echo $? " can get the most recently program exit value.

Example program:



Result:



Reference:
  1. UNIX Shell Programming 

沒有留言:

張貼留言

Linux driver: How to enable dynamic debug at booting time for built-in driver.

 Dynamic debug is useful for debug driver, and can be enable by: 1. Mount debug fs #>mount -t debugfs none /sys/kernel/debug 2. Enable dy...