Changes between Initial Version and Version 1 of Ticket #12298, comment 17


Ignore:
Timestamp:
Aug 20, 2015, 5:56:48 PM (9 years ago)
Author:
ttcoder

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12298, comment 17

    initial v1  
    33stdio.h (and the man page) define printf() as returning the number of bytes written ''or an error code'', but it never returns an error here, in Terminal or Tracker.
    44
    5 Also tried to dump `stdout` (which is a `FILE *`) using a BAlert, but it always has an ex value/address, regardless of context (and the address changes at each invokation for that matter). Dunno if it's normal that `FILE * stdout` is "valid" in both contexts, in the 'raw' C++ code, but when said C++ code invokes `system()` to call a command, said command no longer has an stdout.. Maybe the standard lib's FILE * is just a wrapper around something else anyway.
     5Also tried to dump `stdout` (which is a `FILE *`) using a BAlert, but [it's never NULL], it always has an hex value/address, regardless of context (and the address changes at each invokation for that matter). Dunno if it's normal that `FILE * stdout` is "valid" in both contexts, in the 'raw' C++ code, yet when said C++ code invokes `system()` to call a command, said command no longer has an stdout.. Maybe the standard lib's FILE * is just a wrapper around something else anyway.
    66
    77Beside the stdlib, I also played with POSIX `open()`:
     
    1313and the result is surprising: when run from a Terminal, I get the expected file descriptor value 3, meaning that 0 1 and 2 are already reserved, as expected.
    1414
    15 When run from Tracker I get... If you said "0" you're wrong -- I get '''10''' !
    16 
    17 WTH?? :-b
     15When run from Tracker I get... If you said "0" you're wrong -- I get '''10''' ! WTH?? :-b