Hi All!

How send socket descriptor in command prompt arguments on Linux without using fork function?
I try this:
Qt Code:
  1. void Server::incomingConnection( int handle )
  2. {
  3. ...
  4.  
  5. QProcess *fork_process = new QProcess( this );
  6. fork_process->setEnvironment( QProcess::systemEnvironment() );
  7. fork_process->setProcessChannelMode( QProcess::MergedChannels );
  8. fork_process->setWorkingDirectory( QCoreApplication::applicationDirPath() );
  9.  
  10. QStringList process_args;
  11. process_args << "SD";
  12. process_args << QString::number( handle );
  13.  
  14. fork_process->start( QCoreApplication::applicationFilePath(), process_args );
  15.  
  16. if (!fork_process->waitForStarted())
  17. {
  18. qDebug() << "fork_process Error: " << fork_process->errorString();
  19.  
  20. delete fork_process;
  21. fork_process = 0;
  22.  
  23. return;
  24. }
  25.  
  26. connect( fork_process, SIGNAL(finished(int,QProcess::ExitStatus)),
  27. this, SLOT(processFinished(int,QProcess::ExitStatus)) );
  28.  
  29. ...
  30. }
To copy to clipboard, switch view to plain text mode 

On Windows it work fine, but on Linux I'm get error: Invalid socket descriptor.