Skip to main content
added 80 characters in body
Source Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

When a process is started it is done via the system call exec()execve. The first argument to this call is the path to the executable. The second can be chosen arbitrarily, by usually it is the name of the program to be executed. (After this follows the real path tofollow the executable and other stuff)command line arguments.) This firstsecond argument is what you see in psps.

By convention, login shells are started with a "-"- prepended to this name. So your -bash process is a login instance of bash.

When a process is started it is done via the system call exec(). The first argument to this call can be chosen arbitrarily, by usually it is the name of the program to be executed. (After this follows the real path to the executable and other stuff). This first argument is what you see in ps.

By convention, login shells are started with a "-" prepended to this name.

When a process is started it is done via the system call execve. The first argument to this call is the path to the executable. The second can be chosen arbitrarily, by usually it is the name of the program to be executed. (After this follow the command line arguments.) This second argument is what you see in ps.

By convention, login shells are started with a - prepended to this name. So your -bash process is a login instance of bash.

Source Link
ohno
  • 417
  • 3
  • 6

When a process is started it is done via the system call exec(). The first argument to this call can be chosen arbitrarily, by usually it is the name of the program to be executed. (After this follows the real path to the executable and other stuff). This first argument is what you see in ps.

By convention, login shells are started with a "-" prepended to this name.