[bug #68006] 'system' command unable to redirect stderr or stdout to "nul"

Philip Nienhuis <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Update of bug #68006 (group octave):

                  Status:               Confirmed => Patch Submitted

    _______________________________________________________

Follow-up Comment #5:

Fix in comment #3 seems to work here:

# Redirect stderr
octave:1> jv = system ("java -version 2> nul"); jv
jv = 0

octave:2> jv = system ("java --version 2> nul"); jv
java 24 2025-03-18
Java(TM) SE Runtime Environment (build 24+36-3646)
Java HotSpot(TM) 64-Bit Server VM (build 24+36-3646, mixed mode, sharing)
jv = 0

# Redirect stdout
octave:3> jv = system ("java --version > nul"); jv
jv = 0

octave:4> jv = system ("java -version > nul"); jv
java version "24" 2025-03-18
Java(TM) SE Runtime Environment (build 24+36-3646)
Java HotSpot(TM) 64-Bit Server VM (build 24+36-3646, mixed mode, sharing)
jv = 0

BTW, that's with dev Octave-12 on Windows 10. 
(I do have a basic Windows 11 installed (multiboot w Win 10 and Linux Fedora
42) but very rarely use it as the Windows-es screw up each other's biometric
login settings.  But if you insist I can try on Win 11 as well.)

Status -> "Patch Submitted"


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68006>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaYRfpwAKCRCqLAuaBUf3
TiE3AQCnKhShsqaJ7gVdmgt07WlKMeKa7xkt9yo7/5wCAFihegD/dJ2CqzSTzkkR
ONas0K68ihvnrIRQTPvqzr8ggSS/fg4=
=N4pS
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.