Cygwin list,

Sorry for the inadvertant re-send of my previous message.  Here is
what I meant to send:

I have created two strace output files and attached snippets from both.
Both were created while running 1.3.20-1.  In the first snippet I
executed:

  $ d:/cygcheck/testscript

in the second:

  $ /cygdrive/d/cygcheck/testscript

The snippets show that in the first case the file is opened in binary
mode and in the second, text mode.

Would appreciate any help with this.

Thanks,
Paul
[EMAIL PROTECTED] 


>Date: Mon, 24 Feb 2003 15:59:22
>To: [EMAIL PROTECTED]
>From: Paul Coltrin <[EMAIL PROTECTED]>
>Subject: Re: Change in command line behavior between cygwin 1.3.18-1 and
1.3.19-1
>
>Elfyn,
>
>Thanks for the reply.
>
>Unfortunately, the behavior also exists in 1.3.20.  I first found it there
>and then worked back to narrow down in which version it appeared.
>
>In order to see the problem, the script needs to have DOS-style
>line endings, and also it must invoked with an MKS-style path,
>ie with a Windows style drive letter but with unix forward slashes -
> C:/cygtest/testscript .
>
>(These are both conditions I would like to preserve in order to minimize
>porting and maitainability issues.)
>
>Paul Coltrin
>[EMAIL PROTECTED]
>
>At 06:27 PM 2/22/03 -0000, you wrote:
>>> I am hoping that someone can explain this change of behavior I have
>>> noticed that occurred between Cygwin version 1.3.18-1 and 1.3.19-1.
>>>
>>> In order to remain compatible with MKS, and also to keep version control
>>> as simple as possible we need to continue using ksh to execute our
>>scripts.
>>> On Cygwin we have been using the pdksh (
>>> http://www.cs.mun.ca/~michael/pdksh/ ).
>>>
>>> Here is a sample script:
>>> ---
>>> #!/bin/ksh
>>> set +u
>>> ---
>>
>>Hello, I just tried your testscript and it works under 1.3.20 . Perhaps
>>upgrading to the latest version of the cygwin1.dll would fix your problem?
>>
>>
>>Regards,
>>
>>Elfyn McBratney
>>[EMAIL PROTECTED]
>>www.exposure.org.uk
>>
>>
>>
  353   72139 [main] ksh 167 time: 1046117790 = time (0)
 4022   76161 [main] ksh 167 time: 1046117790 = time (0)
  575   76736 [main] ksh 167 time: 1046117790 = time (0)
 2294   79030 [main] ksh 167 open: open (/cygdrive/d/cygcheck/testscript, 0x0)
  321   79351 [main] ksh 167 normalize_posix_path: src /cygdrive/d/cygcheck/testscript
  614   79965 [main] ksh 167 normalize_posix_path: /cygdrive/d/cygcheck/testscript = 
normalize_posix_path (/cygdrive/d/cygcheck/testscript)
  317   80282 [main] ksh 167 mount_info::conv_to_win32_path: conv_to_win32_path 
(/cygdrive/d/cygcheck/testscript)
  317   80599 [main] ksh 167 mount_info::cygdrive_win32_path: src 
'/cygdrive/d/cygcheck/testscript', dst 'd:\cygcheck\testscript'
  315   80914 [main] ksh 167 set_flags: flags: text (0x2000000)
  295   81209 [main] ksh 167 mount_info::conv_to_win32_path: src_path 
/cygdrive/d/cygcheck/testscript, dst d:\cygcheck\testscript, flags 0x2000020, rc 0
  800   82009 [main] ksh 167 symlink_info::check: not a symlink
  327   82336 [main] ksh 167 symlink_info::check: 0 = symlink.check 
(d:\cygcheck\testscript, 0x22F458) (0x2000020)
  318   82654 [main] ksh 167 path_conv::check: root_dir(d:\), 
this->path(d:\cygcheck\testscript), set_has_acls(8)
  324   82978 [main] ksh 167 dtable::build_fhandler: fd 3, fh 0x615E094C
  304   83282 [main] ksh 167 fhandler_base::open: (d:\cygcheck\testscript, 0x100000) 
query_open 0
  467   83749 [main] ksh 167 fhandler_base::open: 0xA4 = CreateFile 
(d:\cygcheck\testscript, 0x80000000, 0x7, 0x22F898, 0x3, 0x2000081, 0)
  335   84084 [main] ksh 167 fhandler_base::set_flags: flags 0x100000, supplied_bin 
0x20000
  302   84386 [main] ksh 167 fhandler_base::set_flags: filemode set to text
  296   84682 [main] ksh 167 fhandler_base::open: 1 = fhandler_base::open 
(d:\cygcheck\testscript, 0x100000)
  302   84984 [main] ksh 167 fhandler_disk_file::open: 1 = fhandler_disk_file::open 
(d:\cygcheck\testscript, 0x0)
  304   85288 [main] ksh 167 open: 3 = open (/cygdrive/d/cygcheck/testscript, 0x0)
  330   85618 [main] ksh 167 dtable::dup2: dup2 (3, 10)
  309   85927 [main] ksh 167 dtable::build_fhandler: fd -1, fh 0x615E2674
  308   86235 [main] ksh 167 fhandler_base::dup: in fhandler_base dup
  320   86555 [main] ksh 167 dtable::dup_worker: duped 
'/cygdrive/d/cygcheck/testscript' old 0xA4, new 0xA0
  309   86864 [main] ksh 167 dtable::dup2: newfh->io_handle 0xA0, oldfh->io_handle 0xA4
  299   87163 [main] ksh 167 dtable::dup2: 10 = dup2 (3, 10)
  298   87461 [main] ksh 167 _fcntl: 10 = fcntl (3, 0, 0xA)
  319   87780 [main] ksh 167 close: close (3)

  353   72043 [main] ksh 161 time: 1046117406 = time (0)
 4025   76068 [main] ksh 161 time: 1046117406 = time (0)
  588   76656 [main] ksh 161 time: 1046117406 = time (0)
 2291   78947 [main] ksh 161 open: open (d:/cygcheck/testscript, 0x0)
  319   79266 [main] ksh 161 normalize_posix_path: src d:/cygcheck/testscript
  300   79566 [main] ksh 161 normalize_win32_path: d:\cygcheck\testscript = 
normalize_win32_path (d:/cygcheck/testscript)
  304   79870 [main] ksh 161 mount_info::conv_to_win32_path: conv_to_win32_path 
(d:/cygcheck/testscript)
  299   80169 [main] ksh 161 mount_info::conv_to_win32_path: d:/cygcheck/testscript 
already win32
  296   80465 [main] ksh 161 normalize_win32_path: d:\cygcheck\testscript = 
normalize_win32_path (d:/cygcheck/testscript)
  352   80817 [main] ksh 161 set_flags: flags: binary (0x2)
  298   81115 [main] ksh 161 mount_info::conv_to_win32_path: src_path 
d:/cygcheck/testscript, dst d:\cygcheck\testscript, flags 0x2, rc 0
  777   81892 [main] ksh 161 symlink_info::check: not a symlink
  320   82212 [main] ksh 161 symlink_info::check: 0 = symlink.check 
(d:\cygcheck\testscript, 0x22F458) (0x2)
  312   82524 [main] ksh 161 path_conv::check: root_dir(d:\), 
this->path(d:\cygcheck\testscript), set_has_acls(8)
  320   82844 [main] ksh 161 dtable::build_fhandler: fd 3, fh 0x615E094C
  303   83147 [main] ksh 161 fhandler_base::open: (d:\cygcheck\testscript, 0x100000) 
query_open 0
  462   83609 [main] ksh 161 fhandler_base::open: 0xA4 = CreateFile 
(d:\cygcheck\testscript, 0x80000000, 0x7, 0x22F898, 0x3, 0x2000081, 0)
  331   83940 [main] ksh 161 fhandler_base::set_flags: flags 0x100000, supplied_bin 
0x10000
  301   84241 [main] ksh 161 fhandler_base::set_flags: filemode set to binary
  293   84534 [main] ksh 161 fhandler_base::open: 1 = fhandler_base::open 
(d:\cygcheck\testscript, 0x100000)
  300   84834 [main] ksh 161 fhandler_disk_file::open: 1 = fhandler_disk_file::open 
(d:\cygcheck\testscript, 0x0)
  301   85135 [main] ksh 161 open: 3 = open (d:/cygcheck/testscript, 0x0)
  326   85461 [main] ksh 161 dtable::dup2: dup2 (3, 10)
  306   85767 [main] ksh 161 dtable::build_fhandler: fd -1, fh 0x615E260C
  307   86074 [main] ksh 161 fhandler_base::dup: in fhandler_base dup
  321   86395 [main] ksh 161 dtable::dup_worker: duped 'd:/cygcheck/testscript' old 
0xA4, new 0xA0
  310   86705 [main] ksh 161 dtable::dup2: newfh->io_handle 0xA0, oldfh->io_handle 0xA4
  296   87001 [main] ksh 161 dtable::dup2: 10 = dup2 (3, 10)
  296   87297 [main] ksh 161 _fcntl: 10 = fcntl (3, 0, 0xA)
  315   87612 [main] ksh 161 close: close (3)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to