logs archiveIRC Archive / Undernet / #asm / 2006 / May / 17 / 1
nnp
can someone do me a favour and check out this piece of code http://hashphp.org/pastebin.php?pid=6714
its a really basic accept loop of a server that just forks a new process for each request, sends them hello world and exits
the problem though is that when i close the sockets(file descriptors) it doesnt appear to inform the client of this
and the client just sits there waiting for more
tiocsti
is th eclient properly looking for peer closing connection (checking for return of 0 from recv)
nnp
the client is telnet
here is the program in C http://hashphp.org/pastebin.php?pid=6715 which does the same thing and after it sends hello world the client displays it the says 'Connection with remote host closed' or some such
edcba
that's because there is no asm in your code
BoR0
lol
ThFabba
after line 52, an int 0x80 call seems to be missing
nnp
thank you sir
it would appear im a tool
;)
one other quick question. It relates to similar code http://hashphp.org/pastebin.php?pid=6717 On line 18 i call inet_ntoa but the first time that string is printed it always contains 0.0.0.0 and subsequent times contains 127.0.0.1. I dont see how it would not be initialised the first time but not the rest
any ideas?
tiocsti
yer prob passing it a 0ed address the first time, maybe
nnp
thats what i thought but you can see that before i print the value i have the accept() call which fills out the buffer
or at least should fill the buffer
         

ramblinman
hi all, new around here, is there a website/bot to paste code to when asking for help? thanks
EwIck
http://rafb.net/paste
thanks for asking
ramblinman
thanks
should be a call to write out hello world, have made the object with nasm -o write write.S, then attempted to run it with s-proc and get a seg fault everytime, can't for the life of me figure it out, http://rafb.net/paste/results/GjobV183.html, this is on a linux box. thanks
_rod
Hi
ramblinman
got it, s-proc pretty much sucks, I'll just go the extra step and ld it, thanks
Ingersol
hio
oc192
whats the manager topic all about?
dbtid
mikkey never checked back in
Fire_ZeroOne
MrAshe
lol
did u get a baby recently Ashe ?
or higher education ?
MrAshe
Nope
I guess he left anyway
« prev next »