[Mono-dev] Socket.Accept() causes [1]+ Stopped

DJL djleehaha at googlemail.com
Thu Oct 6 05:49:39 EDT 2011


Thanks for your help guys
Unfortunatly I've not had much time to investigate further on this issue
however I am 90% sure that Async of the Accept method will NOT solve this
problem.
The program is not just freezing and waiting for something, it is actually
completely stopping and won't continue until typing /fg/  at the
commandline.
The 2 symptoms are, at least in my experience so far, quite different.

The bash script is supposed to connect to this socket as part of its
processing, and since that is running in its own process the Accept() method
should not block for more than a few milliseconds (even if it was a whole
second, that would be quite acceptable)

Furthermore, there is no other processing I can perform until the Accept()
call returns anyway - so farming it off to a background thread would be
pointless...

I suspect, as Robert suggested last week, that something in the bash script
is somehow causing my application to stop.
I did do some fiddling and I think ffmpeg (part of the bash script) is
somehow doing this.

The bash script goes something along these lines:
/cd /some/path ; ( ffmpeg -i somefile.mpg | netcat 127.0.0.1 1234 ) 2>&1/

Although I suspect this is now the wrong place to be asking for help since
it appears it could be a bash/ffmpeg issue

N.B. The above may seem like an odd thing to be doing - i.e. redirecting
stdout via tcpip instead of just using Process.StandardOut
the reason is I was having issues with using Process.StandardOut and
Process.StandardError at the same time (reading from different threads
before you mention that) - for some reason ffmpeg would appear to just hang
when doing this and no output on either stdout or stderr.

I'm now wondering if these 2 symptoms are related?

if I change the bash script to be 
/cd /some/path ; ( cat /dev/null | ffmpeg -i somefile.mpg | netcat 127.0.0.1
1234 ) 2>&1/
It works - however this is no use to me since sometimes the input to ffmpeg
will be stdin - and the code doesn't proceed far enough for me to write
anything to stdin ...

anyone have any thoughts? or should I post this on a bash forum?


-----
DJL's Deep Decks live every Wednesday night from 8PM* on www.housefreaks.co.uk Channel1  - Deep/Tech & Minimal House

http://www.dj-djl.com

*UK Time
--
View this message in context: http://mono.1490590.n4.nabble.com/Socket-Accept-causes-1-Stopped-tp3847351p3877587.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list