PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Regarding _popen() in windows 2000
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Regarding _popen() in windows 2000

Réponse
 
LinkBack Outils de la discussion
Vieux 14/09/2007, 19h00   #1
painulyarun@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Regarding _popen() in windows 2000

Hi All,

I have a console application. In windows 2000, _popen() is returning
invalid handle. I checked the same app with 2003 Server, its working
fine.

Please suggest ....

Thanks !

  Réponse avec citation
Vieux 14/09/2007, 20h38   #2
Daniel Berger
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Regarding _popen() in windows 2000

On Sep 14, 12:05 pm, painulya...@gmail.com wrote:
> Hi All,
>
> I have a console application. In windows 2000, _popen() is returning
> invalid handle. I checked the same app with 2003 Server, its working
> fine.


Are you talking about IO.popen? I didn't think Ruby used _popen()
behind the scenes, but it's been a while since I looked. The _popen()
function is basically broken on Windows. From MSDN:

"If used in a Windows program, the _popen function returns an invalid
file pointer that will cause the program to hang indefinitely. _popen
works properly in a Console application. To create a Windows
application that redirects input and output, see "Creating a Child
Process with Redirected Input and Output" in the Platform SDK."

Regards,

Dan


  Réponse avec citation
Vieux 21/09/2007, 07h05   #3
painulyarun@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Regarding _popen() in windows 2000

On Sep 15, 12:38 am, Daniel Berger <djber...@gmail.com> wrote:
> On Sep 14, 12:05 pm, painulya...@gmail.com wrote:
>
> > Hi All,

>
> > I have a console application. In windows 2000, _popen() is returning
> > invalid handle. I checked the same app with 2003 Server, its working
> > fine.

>
> Are you talking about IO.popen? I didn't think Ruby used _popen()
> behind the scenes, but it's been a while since I looked. The _popen()
> function is basically broken on Windows. From MSDN:
>
> "If used in a Windows program, the _popen function returns an invalid
> file pointer that will cause the program to hang indefinitely. _popen
> works properly in a Console application. To create a Windows
> application that redirects input and output, see "Creating a Child
> Process with Redirected Input and Output" in the Platform SDK."
>
> Regards,
>
> Dan


Thanks a lot! The problem is resolved by setting /MD flag.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h58.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07581 seconds with 11 queries