1. 08 Jan, 2019 1 commit
  2. 07 Jan, 2019 11 commits
  3. 05 Jan, 2019 3 commits
  4. 04 Jan, 2019 1 commit
  5. 03 Jan, 2019 2 commits
  6. 29 Dec, 2018 1 commit
  7. 28 Dec, 2018 5 commits
  8. 27 Dec, 2018 2 commits
  9. 26 Dec, 2018 5 commits
    • Vasily Galkin's avatar
      gspawn, win32: quoted args - escape end backslash · 22e875f7
      Vasily Galkin authored
      According to msdn documentation last backslash(es) of quoted argument
      in a win32 cmdline need to be escaped, since they are
      directly preceding quote in the resulting string:
      Glib <=2.58.0 passed children arguments like C:\Program Files\
      without escaping last backslash(es).
      So it had been passed as "C:\Program Files\"
      windows command line parsing treated this as escaped quote,
      and later text was treated as argument continuation instead of separate
      Existing implementation wasn't easily adoptable to fix this problem,
      so escaping logic was rewritten.
      Since the resulting length need to be increased due to extra escaping
      it was rewritten too. Now the calculated length assumes that all
      escapable chars would be escaped in a resulting string,
      so the length may be a bit bigger than actually needed,
      since backslashes not preceding quotes are not escaped.
      This fixes the glib/tests/spawn-singlethread.c test
      (which introduced testing for special chars to make this problem
      The problem itself was found during investigations about fixing
      related #1566
      The logic is duplicated in protect_argv_string() and protect_wargv() funcs.
      However there is no single obvious way to get rid of duplication -
      !419 (comment 371483)
      So by now adding a note referencing protect_wargv from protect_argv_string,
      the other direction is already referenced.
    • Vasily Galkin's avatar
      gspawn, win32: fix child stderr when coverage enabled · f7f597c8
      Vasily Galkin authored
      This fixes test that were added in previous commit:
      checking for empty stderr failed with coverage enabled, since
      coverage warnings printed from gspawn-win32-helper process were treated
      as child output. This is fixed by removing redirection after child
      finishes execution.
      The dup_noninherited renamed to reopen_noninherited,
      since it actually always closes passed file descriptor.
    • Vasily Galkin's avatar
      gspawn, win32: fix redirecting only stderr · cafb61a1
      Vasily Galkin authored
      Problem was just a typo - wrong variable was checked before enabling
      stderr redirection.
      This fixes error-only redirection spawn-test added in previous commit.
      Behavior while redirecting only stdout should be unaffected,
      since old code tried to redirect stderr to -1 in such case,
      which silently failed I think.
    • Vasily Galkin's avatar
      gspawn, tests: extend spawn_test, run it on win32 · 50cb4f22
      Vasily Galkin authored
      The spawn_test is enabled on win32 meson build, both msys and msvc.
      Some modifications to make it useful for auto-testing on win32:
      - use own argv0 to find helper win32-specific subprogram
      - helper subprogram and conditions changed, so testing is fully
      automated instead of manually checking contents of some MessageBoxes
      Redirection test checks "sort" output for locale-independent string
      instead of relying on "netstat" locale-dependent string.
      Also with "sort" it become usable on unix, so enabled there too.
      Currently this fails on win32 with coverage since
      some coverage-realted error output from gpawn-win32-helper
      is unexpectedly treated as executed subprocess output.
      Added test checking "sort" with error-only redirection. This also fails
      on win32 by now, due to a typo in gspawn-win32.c (checks for stdout
      redirection instead of stderr)
    • Vasily Galkin's avatar
      gspawn, tests: check passing special chars in args · 387739b0
      Vasily Galkin authored
      The existing singlethread g_spawn_sync test is modified and now tests
      that special characters in arguments are correctly passed to child.
      The test is added before spawn escaping fixing on win32
      and covers the case currently broken on win32:
      'trailing \ in argument containing space'.
  10. 23 Dec, 2018 3 commits
  11. 21 Dec, 2018 6 commits