One option is in your system call, do this:
system("ls -l &");
the & at the end of the command line arguments forks the task you’ve launched.
More Related Contents:
- stdout thread-safe in C on Linux?
- What are trade offs for “busy wait” vs “sleep”?
- Pipe two or more shell commands in C using a loop
- What are the flags and macros in a Makefile? [closed]
- C | Static array: why does writing out-of-bounds not result in exception? [duplicate]
- C fopen vs open
- How to set socket timeout in C when making multiple connections?
- Working of fork() in linux gcc [duplicate]
- Where is PATH_MAX defined in Linux?
- What does the brk() system call do?
- How to set the name of a thread in Linux pthreads?
- “undefined reference to `pow'” even with math.h and the library link -lm [duplicate]
- Build .so file from .c file using gcc command line
- How Can I debug a C program on Linux?
- Pipe buffer size is 4k or 64k?
- How to wait for exit of non-children processes
- Compiler using local variables without adjusting RSP
- How to access mmaped /dev/mem without crashing the Linux kernel?
- How to solve “ptrace operation not permitted” when trying to attach GDB to a process?
- Memory usage of current process in C
- What do fully buffered, line buffered and unbuffered mean in C? [closed]
- fd leak, custom Shell
- Ctrl + C interrupt event handling in Linux
- Direct access to hard disk with no FS from C program on Linux
- How to set up a cron job to run an executable every hour?
- How is sleep implemented at the OS level?
- Building a shared library using gcc on Linux and MinGW on Windows
- Linux: Why is sig_atomic_t typedef’ed to int?
- how do compilers assign memory addresses to variables?
- How to print exact value of the program counter in C