+ 1

In python is os.sytem( ... ) blocking or not??

In python, when you do os.system( 'subprocess') is the python calling fork blocked while the subprocesses fork is run, or do they run concurrently???

19th Sep 2020, 1:17 AM
Rick Shiffman
Rick Shiffman - avatar
2 Réponses
+ 3
os.system() calls the C function system(). It spawns a separate process, the implementation is different in each operating system. It is advised to use subprocess.call() instead. Check the official docs https://docs.python.org/3.8/library/os.html#os.system
19th Sep 2020, 5:22 AM
Tibor Santa
Tibor Santa - avatar
+ 2
Tibor Santa, thanks for the help and the pointer to the python documentation.
19th Sep 2020, 7:29 AM
Rick Shiffman
Rick Shiffman - avatar
Aujourd'hui en vedette
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
help
0 Votes
AI
2 Votes
APIs
1 Votes