2

If you open sublime-text in Linux Mint, which of exec() or system() gets called?

Vilhelm Gray
  • 11,516
  • 10
  • 61
  • 114
user2420267
  • 41
  • 1
  • 3

1 Answers1

3

You can use strace to track the system calls made a program:

$ strace -o mystrace.log sublime-text

That will output a chronological list of the system calls traced to the file mystrace.log. The first system call in the log will probably answer your question: typically, a variant of exec* is called such as execve.

If you're curious about how executable binary files actually run however, check out the differences between raw binary and ELF files.

Vilhelm Gray
  • 11,516
  • 10
  • 61
  • 114