Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8419851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:43:45+00:00 2026-06-10T02:43:45+00:00

In one of our modules, we check if a given binary ( varnishd )

  • 0

In one of our modules, we check if a given binary (varnishd) exists, and if so, we run additional tests.

To perform the check, we’re using IPC::Open3, like this (example stripped down for clarity):

perl -MIPC::Open3 -le '
    my $binary = "varnishd";
    my $pid = IPC::Open3::open3(my($in, $out), undef, $binary, "-V");
    waitpid $pid, 0; print $?'

Under Debian Squeeze, or Ubuntu Natty, with perl 5.10.1, if varnishd is not found on the system, this prints 65280 for me.
If you change the $binary to perl, then is (correctly) prints 0.

However, with Ubuntu Precise and perl 5.14.2, this doesn’t work in the same way anymore, and produces the following:

$ perl -MIPC::Open3 -le '
    my $binary = "varnishd";
    my $pid = IPC::Open3::open3(my($in, $out), undef, $binary, "-V");
    waitpid $pid, 0; print $?'
open3: exec of varnishd -V failed at -e line1

When I change the $binary to something that exists, for example perl, then it works correctly and prints 0.

$ perl -MIPC::Open3 -le '
    my $binary = "perl";
    my $pid = IPC::Open3::open3(my($in, $out), undef, $binary, "-V");
    waitpid $pid, 0; print $?'
0

Reading other questions and answers, it looks like I want to look into IPC::Run, but I would like to actually:

  • understand this difference of behaviour
  • avoid any more dependencies if possible

EDIT: forgot to mention that this stuff is running under a chroot environment, both Squeeze and Precise systems, if that’s at all relevant (/dev filesystem differences, for example?).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:43:47+00:00Added an answer on June 10, 2026 at 2:43 am

    You are noticing a bug fix.

    In what you call the 5.10.1 version, open3 reported that the program ran and exited with code 255. Neither of those are true.

    In what you call the 5.14.2 version, open3 throws an exception as it has always been documented to do and as it always has done for some other problems. You may catch failures to launch the child using with eval BLOCK if so desired.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently i am working on a project using prism where one of our modules
We are using Oracle Weblogic 10.3 as our application server. We have multiple modules
I'm using asp.net 4 routing in one of our new product and it works
I am writing unit tests for our main product and have one concern: how
I am currently working on a module that takes one of our business objects
As part of one our system's we enable a user in the backoffice to
One of our servers has 4 gb of data. But as of now i
One of our products contains multiple WCF services whose business layers all sit on
One of our staff members has lost his mailbox but luckily has a dump
One of our user did an insert statement in development server. The insert worked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.