Comments (9)
Smylers, you fabulous and amazing person! You have excellent timing!
Which version of Windows are you using? It looks like cmd changed its behaviour at some point, and I think I have a fix, but I would love a tester. :)
(Let me now get said fix into git to see if it helps.)
~ Paul
from ipc-system-simple.
Windows 7 — sorry, should've thought to include that
from ipc-system-simple.
Patch applied! Any chance you can test what's currently in git (with 1d99f77 applied), or this tarball (which is the same, but already built so there's not futzing with dzil).
Many, many thanks!
from ipc-system-simple.
Unfortunately that doesn't help: I get the same behaviour as with 1.25.
from ipc-system-simple.
Ah, because we have spaces in our argument, and not our command. Creating commands on Windows is tricky, because one can't pass in individual arguments, one passes a "command line" to Win32::Process::Create().
I feel this should just be a matter getting ISS to add quotes to its arguments, but I've got a sinking suspicion that's obvious, simple, and wrong. I have a bit of a gotcha here in that I don't presently have easy access to a Windows machine.
Does running cmd /C start /D C:\Program Files .
directly in the Windows shell do the right thing, or does it come up with the same error? (I'd expect one would need to quote C:\Program Files
)
Now digging into the Perl core to see how it's done there, although since it's 2am localtime I may not have anything to report tonight.
from ipc-system-simple.
Correct, the quotes are needed at the Windows shell.
And indeed sticking quotes into the argument passed to system
does work (both core's and yours). But it feels icky to have to put quotes into an argument that's documented as not being passed to the shell — and I wasn't confident I knew how to quote the name correctly in the general case.
I'm not sure what the International Space Station has to do with anything, but my Windows knowledge is flaky, and nothing would surprise me at this stage.
Incidentally, the reason I'm opening Explorer in such a convoluted way in the first place is because a simple explorer $dir
opens a new window each time (which irritates users), whereas if there's already an Explorer window open on $dir
, start $dir
will just switch to it. But start
isn't a program, it's a built-in command in cmd
, hence the need to wrap it. And, astonishingly, start "$dir"
fails if $dir
contains a space! (No error message, but it just opens another Command Prompt window.) However, that limitation doesn't apply to its /D
option, so telling it to start
to start in $dir
and then open .
actually does what's required, despite seeming like at least 2 levels of overkill. I can no longer remember what possessed me to try it.
Good luck.
from ipc-system-simple.
It turns out that the built-in system
may be buggy on Windows: this recent Perl 5 ticket includes a discussion in which there seems to be general agreement that it's argument-splitting isn't quite right: https://rt.perl.org/Public/Bug/Display.html?id=121283#txn-1282174
There's no suggestion of a fix yet, but it seems possible that system
's behaviour on Windows may change.
So it may not be worth making IPC::System::Simple
compatible with its current behaviour — especially if it turns out that what IPC::System::Simple
currently does it what built-in system
will be switching to.
from ipc-system-simple.
Just step into this issue because I was searching for a solution for the same problem but with IPC::Run module.
The think is that putting the command line with spaces between double quotes and submitting it to run through IPC::Open3 works as expected.
from ipc-system-simple.
I believe that this issue may be resolved in IPC-System-Simple version 1.30, just released to CPAN. Can you confirm?
Thank you very much.
Jim Keenan
from ipc-system-simple.
Related Issues (20)
- IPC::System::Simple adds commas to command line breaking everything HOT 6
- capturex with spaces and an empty argument works fine on Linux - and fails on Win64 (Windows 7 Strawberry Perl) HOT 2
- System simple does not recognise metacharacters HOT 1
- On Windows, cpanm IPC::System::Simple fails due to missing dependency HOT 9
- Make IPC::System::Simple respect Win32::SetChildShowWindow
- Can't clone the repo, missingSpaceBeforeDate HOT 2
- t/07-taint.t may fail (on env var TEST_ACTIVE) HOT 13
- Multi-argument run() fails on Windows when first parameter is a full path that contains spaces HOT 3
- t/08_core.t fails, due to different die message HOT 8
- runx Sometimes Fails to Pass Paths with Spaces In Them on Windows HOT 10
- Change log is missing changes for 1.26 HOT 1
- IPC-System-Simple-1.26-TRIAL: t/04_capture.t seems to hang on Strawberry Perl HOT 24
- Should arguments other than 'command' be checked for definedness?
- Test failures with Strawberry Perl 5.30.1 HOT 5
- IPC::System::Simple can return "No child processes" (ECHILD) when $SIG{CHLD} is set. HOT 1
- Windows 10 issue on 5.30.2 HOT 1
- Core dump file remains on disk after running t/08_core.t on FreeBSD HOT 1
- cpanratings.perl.org no longer exists HOT 1
- capture throws away captured output in error case
- t/08_core.t fails on ASAN builds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipc-system-simple.