Mail Archives: cygwin/2018/04/20/09:11:47
X-Recipient: | archive-cygwin AT delorie DOT com
|
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:reply-to:subject:to:references:from:message-id
|
| :date:mime-version:in-reply-to:content-type
|
| :content-transfer-encoding; q=dns; s=default; b=Kc4XA0gjnzSzgLmi
|
| AUnx2krH9I89aXy5fTcPZILD/G/goQxsFHnAQ3PbvSWyGZJkkN43TlrTZInW+0S5
|
| D98VL5jN6vt7QVaOaRf93GFd1N2SQZJ52LHm0BuO0pfqcBdPeBR9PgQb1NAzmzAz
|
| gaKuRs7j50XupVIoEZbMcSbfoSw=
|
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:reply-to:subject:to:references:from:message-id
|
| :date:mime-version:in-reply-to:content-type
|
| :content-transfer-encoding; s=default; bh=0rvW6VwvrrlCQ0QfBdUMLp
|
| YD93s=; b=KQ0XFlwiifixvFW5jCE6GyPGNT84TD7d1AVTwreJ1V3m79xR/c0Ole
|
| j4ukz5wKJzGElxOi81/DMbDvR+eosHhfcPZG3qpoo+CExikehWXQCSZaVb72Hi8o
|
| LyviyXI/T0A3TaVqW0IM+5F/jIo+R1ZbtLhZPNy8J1Z1h3MhXKYvg=
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
Authentication-Results: | sourceware.org; auth=none
|
X-Virus-Found: | No
|
X-Spam-SWARE-Status: | No, score=-6.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=H*R:D*ca, HContent-Transfer-Encoding:8bit
|
X-HELO: | smtp-out-so.shaw.ca
|
X-Authority-Analysis: | v=2.3 cv=cav8UELM c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=2MZV_eq1Q6pihxzkXFQA:9 a=QEXdDO2ut3YA:10
|
Reply-To: | Brian DOT Inglis AT SystematicSw DOT ab DOT ca
|
Subject: | Re: Fails to launch batch script in some directories
|
To: | cygwin AT cygwin DOT com
|
References: | <Alexpux/MSYS2-packages/issues/1225 AT github DOT com> <76873039-f459-5534-ce8a-bb8fcbd35274 AT gmail DOT com>
|
From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
|
Message-ID: | <6d4b0108-d3cc-7dab-af95-3856faf3ebaf@SystematicSw.ab.ca>
|
Date: | Fri, 20 Apr 2018 07:11:27 -0600
|
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
|
MIME-Version: | 1.0
|
In-Reply-To: | <76873039-f459-5534-ce8a-bb8fcbd35274@gmail.com>
|
X-CMAE-Envelope: | MS4wfPco3s9oxyNuk/0Wj3veVhfKJtjakSjaQ7vAWNtvFdvOWwkCVFfPJmlEWbSTnxuyrw0PI0QDmhLxvCJflsw645gGigX52AypTjRbtsjPkHk2kxBaXIJI spuSzSrhzLsQ6kJ6q8rs1XS0/ZXod/VYCCNUgQT8eqDIpuNF60dCE54z03lzJ3VRWdeMag69OHZpHA==
|
X-IsSubscribed: | yes
|
On 2018-04-20 06:33, David Macek wrote:
> Whoa, an interesting bug. I'm forwarding this to the Cygwin mailing list for
> reference. I might take a deeper look over the weekend if no-one beats me to it.
>
> It seems like running batch files (.bat, .cmd) inside a directory with an at
> sign and a space (such as '@ x' or 'x @') fails.
>
> /w/temp/@ x$ ./hello.bat
> 'W:\temp\@' is not recognized as an internal or external command,
> operable program or batch file.
From strace on cmd run from directory created with same name, looks like
child_info_spawn::worker may need to escape/double quote the name if it contains
spaces:
65 119143 [main] bash 9384 spawnve: spawnve (./ntpstatus.cmd,
./ntpstatus.cmd, 0x60006F6B0)
34 119177 [main] bash 9384 child_info_spawn::worker: mode = 3, prog_arg =
./ntpstatus.cmd
36 119213 [main] bash 9384 perhaps_suffix: prog './ntpstatus.cmd'
30 119243 [main] bash 9384 normalize_posix_path: src ./ntpstatus.cmd
28 119271 [main] bash 9384 cwdstuff::get: posix /proc/cygdrive/c/.../@ x
29 119300 [main] bash 9384 cwdstuff::get: (/proc/cygdrive/c/.../@ x) =
cwdstuff::get (0x600000010, 32768, 1, 0), errno 108
29 119329 [main] bash 9384 normalize_posix_path: /proc/cygdrive/c/.../@
x/ntpstatus.cmd = normalize_posix_path (./ntpstatus.cmd)
30 119359 [main] bash 9384 mount_info::conv_to_win32_path:
conv_to_win32_path (/proc/cygdrive/c/.../@ x/ntpstatus.cmd)
33 119392 [main] bash 9384 mount_info::cygdrive_win32_path: src
'/proc/cygdrive/c/.../@ x/ntpstatus.cmd', dst 'C:\...\@ x\ntpstatus.cmd'
33 119425 [main] bash 9384 set_flags: flags: binary (0x2)
28 119453 [main] bash 9384 mount_info::conv_to_win32_path: src_path
/proc/cygdrive/c/.../@ x/ntpstatus.cmd, dst C:\...\@ x\ntpstatus.cmd, flags
0x4022, rc 0
153 119606 [main] bash 9384 symlink_info::check: 0x0 = NtCreateFile
(\??\C:\...\@ x\ntpstatus.cmd)
85 119691 [main] bash 9384 symlink_info::check: not a symlink
79 119770 [main] bash 9384 symlink_info::check: 0 = symlink.check(C:\...\@
x\ntpstatus.cmd, 0xFFFFA850) (0x4022)
55 119825 [main] bash 9384 path_conv::check: this->path(C:\...\@
x\ntpstatus.cmd), has_acls(1)
35 119860 [main] bash 9384 perhaps_suffix: buf C:\...\@ x\ntpstatus.cmd,
suffix found ''
90 119950 [main] bash 9384 child_info_spawn::worker: priority class 32
95 120045 [main] bash 9384 fhandler_console::need_invisible: invisible_console 0
39 120084 [main] bash 9384 build_env: envp 0x60006F6B0
38 120122 [main] bash 9384 spenv::retrieve: no_envblock 0
40 120162 [main] bash 9384 spenv::retrieve: duping existing value for
'USERDOMAIN='
48 120210 [main] bash 9384 spenv::retrieve: no_envblock 0
39 120249 [main] bash 9384 spenv::retrieve: duping existing value for
'USERNAME='
29 120278 [main] bash 9384 spenv::retrieve: no_envblock 0
28 120306 [main] bash 9384 spenv::retrieve: duping existing value for
'LOGONSERVER='
35 120341 [main] bash 9384 spenv::retrieve: no_envblock 0
32 120373 [main] bash 9384 spenv::retrieve: no_envblock 0
27 120400 [main] bash 9384 spenv::retrieve: duping existing value for
'USERPROFILE='
29 120429 [main] bash 9384 spenv::retrieve: no_envblock 0
27 120456 [main] bash 9384 spenv::retrieve: duping existing value for
'SYSTEMROOT='
43 120499 [main] bash 9384 spenv::retrieve: no_envblock 0
31 120530 [main] bash 9384 spenv::retrieve: duping existing value for 'WINDIR='
37 120567 [main] bash 9384 spenv::retrieve: no_envblock 0
30 120597 [main] bash 9384 spenv::retrieve: no_envblock 0
27 120624 [main] bash 9384 spenv::retrieve: duping existing value for
'HOMEDRIVE='
33 120657 [main] bash 9384 spenv::retrieve: no_envblock 0
28 120685 [main] bash 9384 spenv::retrieve: duping existing value for
'HOMEPATH='
34 120719 [main] bash 9384 build_env: env count 108, bytes 9407
324 121043 [main] bash 9384 build_env: envp 0x180306DA8, envc 108
34 121077 [main] bash 9384 child_info::child_info: subproc_ready 0x0
20253 141330 [main] bash 9384 child_info_spawn::worker: pid 9384, prog_arg
./ntpstatus.cmd, cmd line "C:\...\@ x\ntpstatus.cmd")
102 141432 [main] bash 9384! child_info_spawn::worker: new process name
\\?\C:\...\@ x\ntpstatus.cmd
56 141488 [main] bash 9384! fhandler_base::close_with_arch: line 1129:
/dev/pty0<0x1803054F0> usecount + -1 = 3
31 141519 [main] bash 9384! fhandler_base::close_with_arch: not closing
archetype
67 141586 [main] bash 9384! fhandler_base::close_with_arch: line 1129:
/dev/pty0<0x1803054F0> usecount + -1 = 2
33 141619 [main] bash 9384! fhandler_base::close_with_arch: not closing
archetype
34 141653 [main] bash 9384! fhandler_base::close_with_arch: line 1129:
/dev/pty0<0x1803054F0> usecount + -1 = 1
35 141688 [main] bash 9384! fhandler_base::close_with_arch: not closing
archetype
38 141726 [main] bash 9384! child_info_spawn::worker: spawned windows pid 9260
52 141778 [main] bash 9384! proc_subproc: args: 1, -2145357536
--- Process 9260 created
--- Process 9384 thread 8320 created
306 142084 [main] bash 9384! pinfo::wait: created tracking thread for pid
9384, winpid 0x242C, rd_proc_pipe 0x284
48 142132 [main] bash 9384! proc_subproc: added pid 9384 to proc table, slot 0
45 142177 [main] bash 9384! proc_subproc: returning 1
--- Process 9260 loaded C:\Windows\System32\ntdll.dll at 00007ffb92730000
89 142266 [waitproc] bash 9384! cygthread::stub: thread 'waitproc', id
0x2080, stack_ptr 0x329CCD0
--- Process 9260 loaded C:\Windows\System32\kernel32.dll at 00007ffb918e0000
--- Process 9260 loaded C:\Windows\System32\KernelBase.dll at 00007ffb8f750000
--- Process 9260 loaded C:\Windows\System32\msvcrt.dll at 00007ffb91840000
--- Process 9260 thread 5056 created
--- Process 2844 created
--- Process 2844 loaded C:\Windows\System32\ntdll.dll at 00007ffb92730000
--- Process 2844 loaded C:\Windows\System32\kernel32.dll at 00007ffb918e0000
--- Process 2844 loaded C:\Windows\System32\KernelBase.dll at 00007ffb8f750000
--- Process 2844 loaded C:\Windows\System32\msvcrt.dll at 00007ffb91840000
--- Process 2844 thread 5964 created
--- Process 2844 thread 32 created
--- Process 2844 loaded C:\Windows\System32\ulib.dll at 00007ffb7dcd0000
--- Process 2844 thread 6228 created
--- Process 2844 loaded C:\Windows\System32\fsutilext.dll at 00007ffb8a980000
--- Process 2844 thread 5964 exited with status 0x0
--- Process 2844 thread 6228 exited with status 0x0
--- Process 2844 thread 32 exited with status 0x0
--- Process 2844 exited with status 0x0
--- Process 9260 thread 5056 exited with status 0x1
--- Process 9260 exited with status 0x1
45516 187782 [waitproc] bash 9384! pinfo::maybe_set_exit_code_from_windows: pid
9384, exit value - old 0x0, windows 0x1, cygwin 0x8000100
110 187892 [waitproc] bash 9384! proc_waiter: exiting wait thread for pid 9384
47 187939 [main] bash 9384! proc_terminate: nprocs 1
81 188020 [main] bash 9384! proc_subproc: args: 5, 1
80 188100 [main] bash 9384! proc_subproc: clear waiting threads
47 188147 [main] bash 9384! proc_subproc: finished clearing
34 188181 [main] bash 9384! proc_subproc: returning 1
30 188211 [main] bash 9384! cygthread::terminate_thread: thread '(null)', id
0x2080, inuse 0, stack_ptr 0x329CCD0
31 188242 [main] bash 9384! proc_terminate: leaving
30 188272 [main] bash 9384! pinfo::maybe_set_exit_code_from_windows: pid
9384, exit value - old 0x8000100, windows 0xDEADBEEF, cygwin 0x8000100
55 188327 [main] bash 9384! pinfo::exit: Calling ExitProcess n 0x4000000,
exitcode 0x1
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -