Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is D's version of C++'s system function?

Tags:

d

How do I execute a command in the system shell in D (preferably Tango)?

like image 504
jcao219 Avatar asked Jun 27 '10 03:06

jcao219


2 Answers

Phobos provides std.process (D1.x) (D2.x). Then you would just use the system() call. The exec commands are also available here.

like image 170
he_the_great Avatar answered Oct 19 '22 23:10

he_the_great


tango.stdc.stdlib should, as tango's docs say,

provide[s] an essentially complete interface to the standard C library (according to ISO/IEC 9899:1999)

(stdlib.h is where C defines system).

like image 40
Alex Martelli Avatar answered Oct 19 '22 22:10

Alex Martelli