jobsctrl

How to restart some progress which is stopped by "ctrl+z"?


When I am using

postgres -D /usr/local/pgsql/data 

to start the postgresql progress, I send a ctrl+z signal to stop it.
And now when I used createuser and psql, it has no response.

what can I do?


Solution

  • After you press ctrl+z it will pause execution of the current process and move it to the background. If you wish to start running it in the background, then type bg after pressing ctrl-z.

    If you wish to have it run in the foreground (and take away your ability to enter new commands into the prompt), type fg after pressing ctrl-z

    If you wish to run it in the background right from the beginning use & at the end of your command.

    postgres -D /usr/local/pgsql/data &