[Newbies] OSProcess Exit Status 256

David T. Lewis lewis at mail.msen.com
Thu Sep 11 14:32:29 UTC 2014

Yes, that's right.

An even easier way to do this is to use ProxyPipeline class>>command: to
run the command line. This will do all of the Unix shell parsing directly
in Smalltalk rather than passing it to the external shell. It also
arranges a pipeline of connected programs all in one step, very much as
the Unix shell would do for you.

ProxyPipeline is part of the CommandShell package, which is a companion to
OSProcess. I expect that you already have it loaded, but if not please do
give it a try.


> The semicolon between commands is only meaningful in a shell. It tells
> the shell to run the three programs sequentially. With OSProcess the
> semicolon and the rest of the line is passed to the first program, which
> gives you the error.
> So the easiest way to fix it is to run the three programs separately. Just
> execute the first, wait till it exits, then start the second, etc.
> Levente
> On Thu, 11 Sep 2014, JohnReed Maffeo wrote:
>> I have an application that has been running for many months which uses
>> OSProcess to run a program to record an audio stream. The content is
>> available in two flavors, an mps stream that is recorded in real
>> time and an flv which is recorded in less than a minute. I am working
>> to 
>> refactor the working method to use the faster recording option.
>> I have a methods to create a command line string which I execute using
>> OS process. The command to record the mp3 is simple,
>> the command to record the flv stream is more complex and this may be the
>> source of my problem, but I am not sure and I don't know how to debug
>> it.
>> If I copy either command to a terminal screen and run them there, the
>> programs execute as expected.
>> When I run them in Squeak, the mp3 produces results, the flv dies.
>> The biggest difference between the two command lines is the use of
>> semi-colon command separators  and double quotes in the flv example.
>> The command line for the mp3 is : (exitStatus 0)
>> /opt/local/bin/ffmpeg -i
>> mmsh://wm.bbc.co.uk/wms/prod_rb2_wm_wma_low_intl/p025mlpk_b007gwqn_1410010018428.wma
>> -y -map_metadata -1 -acodec libmp3lame -ab 128k
>> /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp3
>> The command line for the flv is: (exitStatus 256)
>> /opt/local/bin/rtmpdump
>> -r"rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410418602&fmta-token=9e6e9980cc1fc44517
>> 3a649286ea33b76018f14be91bebdc361b035283304013"
>> -a"a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410418602&fmta-token=9e6e9980cc1fc445173a649286ea33b76018f14be91bebdc361b0352
>> 83304013" -y
>> "mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4"
>> -o /Volumes/MediaVault/BBC/490947196.flv ; ffmpeg -loglevel quiet  -i
>> /Volumes/MediaVault/BBC/490947196.flv -c
>> copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm
>> /Volumes/MediaVault/BBC/490947196.flv
>> The command generated by OSProcess may be:
>> /bin/sh -c rtmpdump
>> -r"rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410413706&fmta-token=ccb5e3e42d2288246c
>> 6d083b34cdc49d43bb94c0a0e536bf9a14fbea2857d4d3"
>> -a"a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410413706&fmta-token=ccb5e3e42d2288246c6d083b34cdc49d43bb94c0a0e536bf9a14fbea
>> 2857d4d3" -y
>> "mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4"
>> -o /Volumes/MediaVault/BBC/960136998.flv ; ffmpeg -loglevel quiet  -i
>> /Volumes/MediaVault/BBC/960136998.flv -c
>> copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm
>> /Volumes/MediaVault/BBC/960136998.flv
>> if this is correct, when I run it at the command line, I get an error:
>> RTMPDump 2.4 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer
>> Team; license: GPL ERROR: You must specify a hostname (--host) or url
>> (-r "rtmp://host[:port]/playpath") containing a hostname rm:
>> /Volumes/MediaVault/BBC/960136998.flv: No such file or directory
>> but when I inspect the instance of ExternalUnixOSProcess > osp2 :=
>> ExternalUnixOSProcess command: cmdLine. I don't see anything in
>> the stdout or stderror.
>> Thanks for any suggestions,
>> jrm
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

More information about the Beginners mailing list