Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. And now when I used createuser and psql , it has no response. If you wish to start running it in the background, then type bg after pressing ctrl-z.
How to pause and resume the execution of a process on Linux?
PsSuspend - Windows Sysinternals | Microsoft Docs
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. Also, knowing the resulting PID would be great, so I could continue the process afterwards. I think that this little script may help you. It runs process command send as parameter , suspends it, prints process id and wait until it ends. If you're doing it from an environment such as C code, you can fork and then in the child, send a SIGSTOP to yourself before the exec , preventing further execution.
Subscribe to RSS
As a multitasking operating system, Linux supports the execution of many processes—basically, programs or commands or similar tasks—in the background while you continue to work in the foreground. A foreground process is any command or task you run directly and wait for it to complete. Some foreground processes show some type of user interface that supports ongoing user interaction, whereas others execute a task and "freeze" the computer while it completes that task. From the shell, a foreground process begins by typing a command at the prompt. For example, to see a simple listing of the files in the active directory, type:.
If you have a few years of experience in the Linux ecosystem, and you're interested in sharing that experience with the community and getting paid for your work, of course , have a look at the "Write for Us" page. Cheers, Eugen. When we work with the Linux command line, sometimes we want to start a process and let it run in the background as a job.