public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Perl Win32::Shortcut screws up fork
@ 2005-07-07 19:06 Adye, TJ (Tim)
       [not found] ` <7231C15EAC2F164CA6DC326D97493C8BA1C3FA@exchange35.fed.cclr  c.ac.uk>
  2005-07-08  1:11 ` Brian Dessent
  0 siblings, 2 replies; 41+ messages in thread
From: Adye, TJ (Tim) @ 2005-07-07 19:06 UTC (permalink / raw)
  To: Cygwin List

Hi Larry,

Sorry, I assumed that the rebasing problem was ancient history, since I
hadn't encountered it for so long (and remembered a long-ago comment
about rebaseall being a stop-gap measure). Thanks for putting me right.

Unfortunately I can't get rebaseall to work... running from a bash
prompt in a DOS box (as the docs tell me to), I get

% ps -a
      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
     1668       1    1668       1668    0 22534 19:36:55 /usr/bin/bash
     1268    1668    1268       1800    0 22534 19:45:04 /usr/bin/ps
% rebaseall
ReBaseImage (/usr/bin/cygiconv-2.dll) failed with last error = 6

cygiconv-2.dll is used by bash, but rebaseall is a bash script. What can
I do?

Thanks,
Tim.

> -----Original Message-----
> From: Larry Hall
> Sent: 07 July 2005 19:09
> To: Adye, TJ (Tim); cygwin@cygwin.com
> Subject: Re: Perl Win32::Shortcut screws up fork
> 
> At 01:10 PM 7/7/2005, you wrote:
> >In an attempt to work round the problem with readshortcut I reported
> >earlier, I thought I'd use a Perl script. Unfortunately the
> >Win32::Shortcut package seems to cause problems with process forking
> >(unlike the readshortcut error, this one isn't specific to the latest
> >cygwin DLL). I get an error
> >
> >C:\cygwin\bin\perl.exe (3088): *** unable to remap
> >C:\cygwin\lib\perl5\vendor_perl\5.8\cygwin\auto\Win32\Shortcu
> t\Shortcut.
> >dll to same address as parent(0xBF0000) != 0x1110000
> >     13 [main] perl 3716 fork_parent: child 3088 died waiting for dll
> >loading 
> 
> 
> Sounds like a classic rebasing issue to me.  Have you tried running 
> 'rebaseall'?
> 
> 
> 
> 
> --
> Larry Hall                              http://www.rfk.com
> RFK Partners, Inc.                      (508) 893-9779 - RFK Office
> 838 Washington Street                   (508) 893-9889 - FAX
> Holliston, MA 01746                     
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Perl Win32::Shortcut screws up fork
@ 2005-07-07 19:13 Adye, TJ (Tim)
  2005-07-08  8:17 ` Reini Urban
  0 siblings, 1 reply; 41+ messages in thread
From: Adye, TJ (Tim) @ 2005-07-07 19:13 UTC (permalink / raw)
  To: Cygwin List

Answering my own question

> cygiconv-2.dll is used by bash, but rebaseall is a bash script.
> What can I do?

I found I could do this by saving the rebase command-line and file list
that rebaseall generates and then running the rebase command directly
from the DOS prompt. Now Perl's Win32::Shortcut and fork work together!
Thanks for the hint.

Nevertheless, there does seem to be a problem with the rebaseall.

Tim.

> -----Original Message-----
> From: Adye, TJ (Tim) 
> Sent: 07 July 2005 19:55
> To: 'Cygwin List'
> Subject: RE: Perl Win32::Shortcut screws up fork
> 
> Hi Larry,
> 
> Sorry, I assumed that the rebasing problem was ancient 
> history, since I hadn't encountered it for so long (and 
> remembered a long-ago comment about rebaseall being a 
> stop-gap measure). Thanks for putting me right.
> 
> Unfortunately I can't get rebaseall to work... running from a 
> bash prompt in a DOS box (as the docs tell me to), I get
> 
> % ps -a
>       PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
>      1668       1    1668       1668    0 22534 19:36:55 /usr/bin/bash
>      1268    1668    1268       1800    0 22534 19:45:04 /usr/bin/ps
> % rebaseall
> ReBaseImage (/usr/bin/cygiconv-2.dll) failed with last error = 6
> 
> cygiconv-2.dll is used by bash, but rebaseall is a bash 
> script. What can I do?
> 
> Thanks,
> Tim.
> 
> > -----Original Message-----
> > From: Larry Hall
> > Sent: 07 July 2005 19:09
> > To: Adye, TJ (Tim); cygwin@cygwin.com
> > Subject: Re: Perl Win32::Shortcut screws up fork
> > 
> > At 01:10 PM 7/7/2005, you wrote:
> > >In an attempt to work round the problem with readshortcut 
> I reported
> > >earlier, I thought I'd use a Perl script. Unfortunately the
> > >Win32::Shortcut package seems to cause problems with 
> process forking
> > >(unlike the readshortcut error, this one isn't specific to 
> the latest
> > >cygwin DLL). I get an error
> > >
> > >C:\cygwin\bin\perl.exe (3088): *** unable to remap
> > >C:\cygwin\lib\perl5\vendor_perl\5.8\cygwin\auto\Win32\Shortcu
> > t\Shortcut.
> > >dll to same address as parent(0xBF0000) != 0x1110000
> > >     13 [main] perl 3716 fork_parent: child 3088 died 
> waiting for dll
> > >loading 
> > 
> > 
> > Sounds like a classic rebasing issue to me.  Have you tried running 
> > 'rebaseall'?
> > 
> > 
> > 
> > 
> > --
> > Larry Hall                              http://www.rfk.com
> > RFK Partners, Inc.                      (508) 893-9779 - RFK Office
> > 838 Washington Street                   (508) 893-9889 - FAX
> > Holliston, MA 01746                     
> > 
> > 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 41+ messages in thread
* Perl Win32::Shortcut screws up fork
@ 2005-07-07 17:10 Adye, TJ (Tim)
       [not found] ` <7231C15EAC2F164CA6DC326D97493C8BA1C3F1@exchange35.fed.cclr  c.ac.uk>
  0 siblings, 1 reply; 41+ messages in thread
From: Adye, TJ (Tim) @ 2005-07-07 17:10 UTC (permalink / raw)
  To: cygwin

Hi,

In an attempt to work round the problem with readshortcut I reported
earlier, I thought I'd use a Perl script. Unfortunately the
Win32::Shortcut package seems to cause problems with process forking
(unlike the readshortcut error, this one isn't specific to the latest
cygwin DLL). I get an error

C:\cygwin\bin\perl.exe (3088): *** unable to remap
C:\cygwin\lib\perl5\vendor_perl\5.8\cygwin\auto\Win32\Shortcut\Shortcut.
dll to same address as parent(0xBF0000) != 0x1110000
     13 [main] perl 3716 fork_parent: child 3088 died waiting for dll
loading

Here's an example that demonstrates the problem.

#!/usr/bin/perl -w
use strict;
use Win32::Shortcut;

if (my $pid= open (my $pipe, '-|')) {
  print "forked child process $pid\n";
  while (<$pipe>) { print "from child: $_"; }
  close ($pipe) or die;
} elsif (defined $pid) {
  print "this is the child\n";
  exit;
} else {
  print "fork failed: $!\n";
}

Without the "use Win32::Shortcut", the script runs fine. With the
package the fork fails with the error message I gave. Win32::Shortcut
works fine if I don't fork or don't do it until after the package is
loaded (eg. I can eval "require Win32::Shortcut" after the fork). I see
this behaviour with Perl 5.8.6 and 5.8.7 and Cygwin 1.5.17-1 and
1.5.18-1.

This error makes it a tricky to convert the Win32::Shortcut output to
Cygwin-style paths with cygpath -u (without resorting to a separate
program to parse the results). Or is there a Perl module that can do the
cygpath conversion? That would be even nicer!

Thanks,
Tim.

==============================  cut here  ==============================
Tim Adye, BaBar Group, Particle Physics Dept.,             _   /|
          Rutherford Appleton Laboratory, UK.              \'o.O'   Oop!
e-mail:   T.J.Adye@rl.ac.uk                                =(___)=  Ack!
WWW:      http://hepwww.rl.ac.uk/Delphi/Adye/homepage.html    U  Thphft!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2005-07-18 13:00 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-07 19:06 Perl Win32::Shortcut screws up fork Adye, TJ (Tim)
     [not found] ` <7231C15EAC2F164CA6DC326D97493C8BA1C3FA@exchange35.fed.cclr  c.ac.uk>
2005-07-08  0:12   ` Larry Hall
2005-07-08  1:11 ` Brian Dessent
2005-07-08  1:19   ` Christopher Faylor
2005-07-08  1:40     ` Brian Dessent
2005-07-08  2:05       ` Eric Blake
2005-07-08  2:27         ` Brian Dessent
2005-07-08  2:38           ` Eric Blake
2005-07-08  2:54             ` Brian Dessent
2005-07-08  2:06       ` Christopher Faylor
2005-07-08  2:21         ` Igor Pechtchanski
2005-07-08  3:45           ` Christopher Faylor
2005-07-08  2:24         ` Eric Blake
2005-07-08  3:50           ` Christopher Faylor
2005-07-08  9:48             ` Gerrit P. Haase
2005-07-11 12:45             ` Jason Tishler
2005-07-12  2:08               ` Christopher Faylor
2005-07-14 12:23                 ` rebaseall (was Re: Perl Win32::Shortcut screws up fork) Jason Tishler
2005-07-14 13:12                   ` Dave Korn
2005-07-14 14:06                     ` Brian Dessent
2005-07-14 19:57                     ` Christopher Faylor
2005-07-14 14:41                   ` Dave Korn
2005-07-14 15:02                     ` Gerrit P. Haase
2005-07-14 15:28                       ` Dave Korn
2005-07-14 15:58                         ` Dave Korn
2005-07-14 15:58                         ` Gerrit P. Haase
2005-07-14 16:09                           ` Dave Korn
2005-07-14 20:01                   ` Christopher Faylor
2005-07-15 11:29                     ` Jason Tishler
2005-07-15 12:22                       ` Dave Korn
2005-07-15 21:01                         ` Jason Tishler
2005-07-16  0:32                           ` Gerrit P. Haase
2005-07-18 13:00                           ` Dave Korn
2005-07-15 14:18                       ` Christopher Faylor
2005-07-16 19:08                         ` Jason Tishler
2005-07-08  1:35   ` Perl Win32::Shortcut screws up fork Eric Blake
2005-07-08  2:27     ` Brian Dessent
  -- strict thread matches above, loose matches on Subject: below --
2005-07-07 19:13 Adye, TJ (Tim)
2005-07-08  8:17 ` Reini Urban
2005-07-07 17:10 Adye, TJ (Tim)
     [not found] ` <7231C15EAC2F164CA6DC326D97493C8BA1C3F1@exchange35.fed.cclr  c.ac.uk>
2005-07-07 18:09   ` Larry Hall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).