Hi, I need to call an external
program from Smalltalk (an .exe on a windows) and get a return code back from
it. I was wondering what the simplest way to do this within
Smalltalk. I can call the module successfully but, I cannot get
the return code. Thanks! Michael Gross Blue Heron Consulting _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Michael Gross wrote:
I'm assuming you want to get the exit code from the external program, when it quits. You should invoke #GetExitCodeProcess:lpExitCode: defined on Win95SystemSupport. Chris _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
ExternalProcess
cshOne: 'ping localhost'
'Pinging dcl-grizzly.yvr.png [127.0.0.1] with 32
bytes of data:
Reply from
127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32
time<1ms TTL=128
Reply from 127.0.0.1: bytes=32
time<1ms TTL=128
Reply from 127.0.0.1: bytes=32
time<1ms TTL=128
Ping statistics
for 127.0.0.1:
Packets: Sent = 4,
Received = 4, Lost = 0 (0% loss),
Approximate round trip times in
milli-seconds:
Minimum = 0ms,
Maximum = 0ms, Average = 0ms'
-Boris From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Winemiller Sent: Thursday, February 05, 2009 9:21 AM To: Michael Gross Cc: [hidden email] Subject: Re: [vwnc] Call External Object I'm assuming you want to get the exit code from the external program, when it quits. You should invoke #GetExitCodeProcess:lpExitCode: defined on Win95SystemSupport. Chris _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Boris,
Thanks for the code. I tried your example and I got the same output. When I try my program I am not
getting any output, it is blank. It looks like nothing is there? If you guys know ……..where
should the program I am calling put its output so I can grab it like the
example below? Thanks !!!! Mike From: Boris Popov
[mailto:[hidden email]] ExternalProcess cshOne: 'ping localhost' 'Pinging dcl-grizzly.yvr.png [127.0.0.1] with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Ping statistics for 127.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0%
loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms' -Boris From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Winemiller Michael Gross wrote: Hi, I need to call an external
program from Smalltalk (an .exe on a windows) and get a return code back from
it. I was wondering what the simplest way to do this
within Smalltalk. I can call the module successfully but, I cannot get the
return code. I'm
assuming you want to get the exit code from the external program, when it
quits. You should invoke #GetExitCodeProcess:lpExitCode: defined on
Win95SystemSupport. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
To stdout AFAIK.
-Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: Michael Gross [mailto:[hidden email]] Sent: Thursday, February 05, 2009 9:52 AM To: Boris Popov; Chris Winemiller Cc: [hidden email] Subject: RE: [vwnc] Call External Object Hi Boris, Thanks for the code. I tried your example and I got the same output. When I try my program I am not getting any output, it is blank. It looks like nothing is there? If you guys know ........where should the program I am calling put its output so I can grab it like the example below? Thanks !!!! Mike From: Boris Popov [mailto:[hidden email]] Sent: Thursday, February 05, 2009 12:30 PM To: Chris Winemiller; Michael Gross Cc: [hidden email] Subject: RE: [vwnc] Call External Object ExternalProcess cshOne: 'ping localhost' 'Pinging dcl-grizzly.yvr.png [127.0.0.1] with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Ping statistics for 127.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms' -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. ________________________________ From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Winemiller Sent: Thursday, February 05, 2009 9:21 AM To: Michael Gross Cc: [hidden email] Subject: Re: [vwnc] Call External Object Michael Gross wrote: Hi, I need to call an external program from Smalltalk (an .exe on a windows) and get a return code back from it. I was wondering what the simplest way to do this within Smalltalk. I can call the module successfully but, I cannot get the return code. I'm assuming you want to get the exit code from the external program, when it quits. You should invoke #GetExitCodeProcess:lpExitCode: defined on Win95SystemSupport. Chris _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Michael Gross-4
I believe exitStatus sent to the ExternalProcess instance will give you
that.
At 11:48 AM 2/5/2009, Michael Gross wrote: Content-Language: en-US --
Alan Knight [|], Engineering Manager, Cincom Smalltalk
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |