Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does my unix shell mean by "[1]+ Stopped"?

Tags:

shell

unix

In my C program run on unix shell, I am using threads to do a task and then end, but sometimes I get these messages written on the shell saying [1]+ Stopped or [1]+ Done.

Does anyone know what these mean?

like image 328
omega Avatar asked Feb 17 '13 22:02

omega


3 Answers

These messages are displayed by the shell when a task in this shell has been stopped or has finished its run.

like image 128
JBL Avatar answered Nov 19 '22 16:11

JBL


It means a process launched in the background exited (Done) or received a stop signal (Stopped).

like image 39
ouah Avatar answered Nov 19 '22 18:11

ouah


As said in other answers, these messages mean that your program launches subprocesses, and the console notifies you of their state. Aren't you confusing threads and processes, maybe? How do you create a "thread"? By using compiler options and the pthreads library, or by using the fork() primitive? If the latter, you're actually creating sub processes, not threads.

like image 1
Miklos Aubert Avatar answered Nov 19 '22 17:11

Miklos Aubert