Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 VisualWorks Smalltalk 中执行外部进程?
使用ExternalProcess fork. 例如ExternalProcess fork: 'date'.。
ExternalProcess fork
ExternalProcess fork: 'date'.
但是,fork只会采用一个程序,并且参数必须在数组中单独传递。如果您想要更复杂的命令,可以使用以下shOne:方法:ExternalProcess shOne: 'test -d data || mkdir data && cd data'.
fork
shOne:
ExternalProcess shOne: 'test -d data || mkdir data && cd data'.