[C] socket programming i'm stuck with that - Programming On Unix
Users browsing this thread: 2 Guest(s)
|
|||
here is my applications...
header: http://pub.iotek.org/p/AOrQrma server app: http://pub.iotek.org/p/D2OUQ7o client app: http://pub.iotek.org/p/z4uA4aL the purpose is little file upload protocol that supports multiple files... its like http... first computers negotiate with unix epoch time (for files' sake) then sends name/path of file... server recieves file then waits for next put header until no header left... then closes connection and exits from child... server is getting stuck after forking... client is working correctly, i tested with netcat... Code: Slax 7.0.8 (32-bits + PAE) |
|||
|
|||
Isn't there a fork bomb ?
Code: bool ischild = false; |
|||
|
|||
(17-09-2014, 08:12 AM)z3bra Wrote: Isn't there a fork bomb ? yes. that is exactly what that code is. as a simple example to get you thinking, you need to see how many files to upload and only make a single fork for each. Code: int count = 0; |
|||
|
|||
Good to see I'm not too rusty :P
|
|||
|
|||
i havent looked here, i put that thing there because i didnt wanted to loop if there is child... it was in the middle of the work... anyway, i fixed everything and found my way through tutorials etc.
here is repository in github to improve and fix code: https://github.com/pvtmert/uftp thanks everyone |
|||