Project

General

Profile

Bug #1502

SystemCommand in Microsoft version

Added by John Abbott over 3 years ago. Updated about 2 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
bug
Target version:
Start date:
08 Oct 2020
Due date:
% Done:

50%

Estimated time:
Spent time:

Description

Andraschko reports that SystemCommand does not work properly in the Microsoft release.


Related issues

Related to CoCoA-5 - Feature #1231: system commandClosed2018-10-26

Related to CoCoA-5 - Feature #1373: GFan also for Microsoft?In Progress2019-12-04

History

#1 Updated by John Abbott over 3 years ago

#2 Updated by John Abbott over 3 years ago

Our code looks to be correct (in agreement with the description given on website cpprefeence.com).

At the moment I have no idea to proceed. A quick internet search did not reveal any other people reporting similar problems.
Emacs on Microsoft appeared to be able to send CLI commands (via M-!).

Puzzled.

#3 Updated by John Abbott about 3 years ago

With luck Andraschko will make some tests this week.
By chance I happened to speak to a friend (Nick) who suggested that it might be a good idea to ensure that output from any command is sent to a file (since Microsoft cmd.exe may not have a notion like "standard output").

#4 Updated by John Abbott over 2 years ago

  • Status changed from New to In Progress
  • Assignee set to John Abbott
  • % Done changed from 0 to 50

Bernhard and I made several tests yesterday: well, he made the tests, I just came up with "clever"(??) ideas.

SUMMARY
  • so that SystemCommand works the code must be compiled in Cygwin with the flag -D_GNU_SOURCE, and the executable must reside in a subdirectory of C:/cygwin
  • if either condition is not satsfied then SystemCommand appears to do nothing, and returns a non-zero code; strangely the test inside CoCoA-5 does not detect that the low-level system command fails... I wonder why?

Anyway, The build scripts now set the compilation flag _GNU_SOURCE if the platform is Cygwin.

We must document the requirement to place the executable in a subtree of C:/cygwin. Where should this advice be?

PS Many thanks to Bernhard for his patience and assiduity.

#5 Updated by John Abbott about 2 years ago

#6 Updated by John Abbott about 2 years ago

  • Target version changed from CoCoA-5.4.0 to CoCoA-5.4.2

Also available in: Atom PDF