Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

bad file descriptor when using recvmsg and multithreading

Hello all,
I am trying to get a program multithreaded, but am having a problem when I get to the recvmsg call. It keeps saying that the socket I am trying to use is a bad file descriptor. I have tested the function non-multithreaded, and it works fine. I am calling the object function from within a static void function (as is required for pthread_create) and from what I have traced, the fd doesn't change through all the redirection. What I was wondering is, can only the object that created the socket use it? or is it pretty much open to all the processes/threads that know that it is there. Any help or comments will be much appreciated =)

Thanks,
Jason

Comments

  • Shawn CarterShawn Carter Member Posts: 0

    ___ \ http://forcoder.org \ free video tutorials and ebooks about / Assembly Go Delphi JavaScript Visual Basic R PHP Java Perl C C# Scratch MATLAB Objective-C PL/SQL Swift C++ Python Visual Basic .NET Ruby Lua Dart SAS Kotlin Rust ABAP FoxPro Crystal D Fortran Erlang Transact-SQL Lisp Awk Logo Alice Scala COBOL Scheme LabVIEW Clojure VBScript Hack Bash Ada ML Apex Prolog F# Julia / _____________

Sign In or Register to comment.