Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't fork and $! not set #9167

Closed
p5pRT opened this issue Dec 26, 2007 · 5 comments
Closed

Can't fork and $! not set #9167

p5pRT opened this issue Dec 26, 2007 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 26, 2007

Migrated from rt.perl.org#49117 (status was 'rejected')

Searchable as RT49117$

@p5pRT
Copy link
Author

p5pRT commented Dec 26, 2007

From jhannah@omnihotels.com

This is a bug report for perl from jhannah@​omnihotels.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.


Huh. Haven't had this problem before. Perl won't fork and won't tell me why...

Any ideas? Thanks,

j

$ cat j.pl
#!/usr/bin/perl

my $pid;
if ($pid == fork) {
  # parent here
} elsif (defined $pid) {
  # child here
} else {
  die "Can't fork​: $!";
}

$ perl j.pl
Can't fork​: at j.pl line 9.
$ cat /proc/version
Linux version 2.6.16.54-0.2.3-default (geeko@​buildhost) (gcc version 4.1.2 20070115 (prerelease) (SUSE Linux)) #1 Thu Nov 22 18​:32​:07 UTC 2007



Flags​:
  category=core
  severity=low


This perlbug was built using Perl v5.8.8 - Fri Nov 9 13​:33​:21 UTC 2007
It is being executed now by Perl v5.8.8 - Fri Nov 9 13​:28​:49 UTC 2007.

Site configuration information for perl v5.8.8​:

Configured by abuild at Fri Nov 9 13​:28​:49 UTC 2007.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration​:
  Platform​:
  osname=linux, osvers=2.6.16, archname=i586-linux-thread-multi
  uname='linux stravinsky 2.6.16 #12 smp fri sep 7 17​:18​:37 cest 2007 i686 i686 i386 gnulinux '
  config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
  ccversion='', gccversion='4.1.2 20070115 (prerelease) (SUSE Linux)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =''
  libpth=/lib /usr/lib /usr/local/lib
  libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=/lib/libc-2.4.so, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version='2.4'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE'
  cccdlflags='-fPIC', lddlflags='-shared'

Locally applied patches​:
 


@​INC for perl v5.8.8​:
  /usr/lib/perl5/site_perl/Omni/MVC
  /usr/lib/perl5/5.8.8/i586-linux-thread-multi
  /usr/lib/perl5/5.8.8
  /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi
  /usr/lib/perl5/site_perl/5.8.8
  /usr/lib/perl5/site_perl
  /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi
  /usr/lib/perl5/vendor_perl/5.8.8
  /usr/lib/perl5/vendor_perl
  .


Environment for perl v5.8.8​:
  HOME=/home/jhannah
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/jhannah/bin​:/usr/local/bin​:/usr/bin​:/usr/X11R6/bin​:/bin​:/usr/games​:/opt/gnome/bin​:/opt/kde3/bin​:/usr/lib/mit/bin​:/usr/lib/mit/sbin
  PERL5LIB=/usr/lib/perl5/site_perl/Omni/MVC
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Dec 27, 2007

From @schwern

jhannah@​omnihotels.com (via RT) wrote​:

Huh. Haven't had this problem before. Perl won't fork and won't tell me why...

Any ideas? Thanks,

j

$ cat j.pl
#!/usr/bin/perl

my $pid;
if ($pid == fork) {
  ^^

Turn on warnings. Perl won't tell you why because you gagged her.

Use of uninitialized value in numeric eq (==) at - line 2.
Can't fork​: at - line 7.
Use of uninitialized value in numeric eq (==) at - line 2.

--
Robrt​: People can't win
Schwern​: No, but they can riot after the game.

@p5pRT
Copy link
Author

p5pRT commented Dec 27, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jan 24, 2008

From @jhannah

Oh. That was dumb. Sorry.

You can close this ticket now. Thanks Schwern!

j

@p5pRT p5pRT closed this as completed Apr 27, 2008
@p5pRT
Copy link
Author

p5pRT commented Apr 27, 2008

p5p@spam.wizbit.be - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant