summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Distinguish more clearly between wait status and exit statuswip/wait-statusSimon McVittie2021-02-2513-105/+151
| | | | | | | | | | | | | | | | | | | | | | On Unix platforms, wait() and friends yield an integer that encodes how the process exited. Confusingly, this is usually not the same as the integer passed to exit() or returned from main(). I find that it's clearer what is going on if we are consistent about referring to the result of wait() as a "wait status", and the value passed to exit() as an "exit status". GSubprocess already gets this right: g_subprocess_get_status() returns the wait status, while g_subprocess_get_exit_status() genuinely returns the exit status. However, the GSpawn family of APIs has tended to conflate the two. Confusingly, g_spawn_check_exit_status() has always checked a wait status, and it would not be correct to pass an exit status to it. Deprecate it in favour of g_spawn_check_wait_status(), which does the same thing. Signed-off-by: Simon McVittie <smcv@collabora.com>
* gversionmacros: Add version macros for GLib 2.70Simon McVittie2021-02-256-1/+71
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Update Portuguese translationHugo Carvalho2021-02-241-33/+38
|
* Merge branch 'zlib-forcefallback' into 'master'Philip Withnall2021-02-241-3/+9
|\ | | | | | | | | meson: Use subproject zlib if "wrap_mode=forcefallback" was specified See merge request GNOME/glib!1959
| * meson: Use subproject zlib if "wrap_mode=forcefallback" was specifiedSeungha Yang2021-02-221-3/+9
| | | | | | | | | | "wrap_mode=forcefallback" would mean that user wants to use dependency which was built from our source, instead of system installed one.
* | Merge branch 'mcatanzaro/kfsb' into 'master'Sebastian Dröge2021-02-241-13/+35
|\ \ | | | | | | | | | | | | gkeyfilesettingsbackend: check for errors when creating file monitors See merge request GNOME/glib!1961
| * | gkeyfilesettingsbackend: check for errors when creating file monitorsMichael Catanzaro2021-02-231-13/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File monitor creation may fail. We should check for this, rather than ignoring it and then spewing criticals upon improperly assuming that we have a valid GFileMonitor rather than NULL. In practice, creating the GFileMonitors here fail when opening a large number of tabs in Epiphany. I'm still investigating to see why, but it doesn't matter for the purposes of this commit.
* | | Update Galician translationFran Dieguez2021-02-231-47/+47
|/ /
* | Update Basque translationAsier Sarasua Garmendia2021-02-231-534/+635
| |
* | Updated Danish translationAsk Hjorth Larsen2021-02-231-6480/+6237
| |
* | Update German translationMario Blättermann2021-02-221-448/+466
|/
* Updated Lithuanian translationAurimas Černius2021-02-211-390/+398
|
* Merge branch '2332-subprocess-launcher-oops' into 'master'Sebastian Dröge2021-02-203-13/+34
|\ | | | | | | | | | | | | gsubprocesslauncher: Don’t close target FDs in close() method Closes #2332 See merge request GNOME/glib!1958
| * tests: Test g_subprocess_launcher_close() doesn’t close too many FDsPhilip Withnall2021-02-191-3/+24
| | | | | | | | | | | | | | | | | | | | | | Expand an existing unit test to check that the target FD of a `g_subprocess_launcher_take_fd()` call doesn’t get closed when `g_subprocess_launcher_close()` is called. Only the source FD should be closed by the parent process. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2332
| * gsubprocesslauncher: Don’t close target FDs in close() methodPhilip Withnall2021-02-192-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced in commit 67a589e505311. Previously, the source/target FD pairs were stored in `needdup_fd_assignments`, in consecutive entries, so source FDs had even indices and target FDs had odd indices. I didn’t notice that the array index was being incremented by 2 when closing FDs, when porting from the old code. So previously the code was only closing the source FDs; after the port, it was closing source and target FDs. That’s incorrect, as the target FDs are just integers in the parent process. It’s only in the child process where they are actually FDs — and `g_subprocess_launcher_close()` is never called in the child process. This resulted in some strange misbehaviours in any process which used `g_subprocess_launcher_take_fd()` with target FDs which could have possibly aliased with other FDs in the parent process (and which weren’t equal to their mapped source FDs). Thanks to Olivier Fourdan for the detailed bug report. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2332
| * gsubprocesslauncher: Improve documentation formatting slightlyPhilip Withnall2021-02-191-4/+4
| | | | | | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | Merge branch 'SkipAsyncData_changed_to_gsize' into 'master'Sebastian Dröge2021-02-201-3/+7
|\ \ | | | | | | | | | | | | Change SkipAsyncData fields to be gsize (and not gssize) See merge request GNOME/glib!1954
| * | Change SkipAsyncData fields to be gsize (and not gssize)Emmanuel Fleury2021-02-191-3/+7
| | |
* | | Update British English translationZander Brown2021-02-191-534/+648
| |/ |/|
* | Update Slovenian translationMatej Urbančič2021-02-181-113/+119
| |
* | Update Brazilian Portuguese translationRafael Fontenelle2021-02-181-214/+208
|/
* Merge branch 'gfile-etag-nullable' into 'master'Philip Withnall2021-02-171-5/+5
|\ | | | | | | | | The ETag returned by various GFile functions is nullable See merge request GNOME/glib!1956
| * The ETag returned by various GFile functions is nullableSebastian Dröge2021-02-171-5/+5
|/ | | | | | This was correctly annotated for proper return values but in case of out parameters it was only annotated as (optional) and not additionally as (nullable).
* 2.67.42.67.4Philip Withnall2021-02-162-1/+65
| | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* Merge branch 'wip/pwithnall/freebsd-spawn-fix' into 'master'Emmanuele Bassi2021-02-161-1/+1
|\ | | | | | | | | tests: Add missing NULL terminator to spawn-singlethread test See merge request GNOME/glib!1955
| * tests: Add missing NULL terminator to spawn-singlethread testPhilip Withnall2021-02-161-1/+1
|/ | | | | | | This should have been in commit b31f3f5f806b2185ca15328e30f5d255de23be67. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* Merge branch '2097-spawn-fd-rewriting' into 'master'Philip Withnall2021-02-168-667/+850
|\ | | | | | | | | | | | | Resolve "GSubprocessLauncher with FD assignment can clash with g_spawn_async internal pipe" Closes #2097 See merge request GNOME/glib!1690
| * gspawn-win32: Various minor internal const-correctness fixesPhilip Withnall2021-02-161-16/+16
| | | | | | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * gspawn-win32: Implement g_spawn_async_with_pipes_and_fds()Philip Withnall2021-02-161-0/+59
| | | | | | | | | | | | | | | | | | The `source_fds`/`target_fds` functionality is not supported on Windows at the moment. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2097
| * gspawn-win32: Refactor internal spawn functionsPhilip Withnall2021-02-161-119/+114
| | | | | | | | | | | | | | | | | | This should introduce no functional changes, but condenses the variants of the internal spawn implementation down to be more like `gspawn.c`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2097
| * gspawn-win32: Rename a variable for consistency with the public headersPhilip Withnall2021-02-161-24/+24
| | | | | | | | | | | | | | | | | | | | | | I realise Windows uses handles rather than PIDs, but given that there are multiple platform-specific implementations of the public `g_spawn_*()` API, I think it is less confusing for them all to use the same naming scheme. This introduces no functional changes. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * gspawn: Minor improvements to documentation formattingPhilip Withnall2021-02-161-7/+8
| | | | | | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * gsubprocess: Use new source/target FD mapping functionality in g_spawn()Philip Withnall2021-02-163-215/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves performance by eliminating the use of a `GSpawnChildSetupFunc` in the common case (since that setup code has now moved into `g_spawn*()` itself), and enables the use of the fix to avoid the child error reporting FD being overwritten by target FD mappings, introduced via `g_spawn_async_with_pipes_and_fds()`. It reworks how the source/target FD mapping is stored within `GSubprocessLauncher` to match what `g_spawn*()` uses. The two approaches are equivalent. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2097
| * gspawn: Add new g_spawn_async_with_pipes_and_fds() APIPhilip Withnall2021-02-164-51/+234
| | | | | | | | | | | | | | | | | | This is a simple wrapper around the new source/target FD mapping functionality in `fork_exec()`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2097
| * tests: Add setlocale() call to spawn-singlethreadPhilip Withnall2021-02-161-0/+3
| | | | | | | | | | | | This allows non-ASCII characters to be used in test messages from it. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * gspawn: Avoid merged FDs being closed on exec()Philip Withnall2021-02-161-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `stdout_fd` was set to (say) 6, and `stderr_fd` was set to 1, the `set_cloexec()` call for setting up `stderr` would set the new `stdout` for the forked process to be closed in the pending `exec()`. This would cause the child process to error when writing to `stdout`. This situation happens when using `G_SUBPROCESS_FLAGS_STDERR_MERGE`. Add some conditions to prevent setting `CLOEXEC` in such cases. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2097
| * gspawn: Avoid custom FDs conflicting with the child_err_report_fdPhilip Withnall2021-02-161-0/+20
| | | | | | | | | | | | | | | | | | | | It was previously possible to specify the FD number which `child_err_report_fd` was assigned, as a target FD in the FD mapping set up using `g_subprocess_launcher_take_fd()`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2097
| * gspawn: Handle arbitrary FD passing and renumbering between fork/execPhilip Withnall2021-02-161-4/+133
| | | | | | | | | | | | | | | | | | | | This effectively moves some of the functionality of `GSubprocess` (`g_subprocess_launcher_take_fd()`) into `g_spawn*()`, which should make implementation a little simpler. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2097
| * gspawn: Combine fork_exec() implementationsPhilip Withnall2021-02-161-236/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an internal change which won’t affect the public API. It should introduce no functional changes, but simplifies the code a little. The arguments from `fork_exec_with_pipes()` have been added to `fork_exec_with_fds()`. `child_close_fds` has been dropped since it’s now an implementation detail within the function. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2097
| * gspawn: Remove spurious blank linesPhilip Withnall2021-02-151-4/+0
| | | | | | | | | | | | This introduces no functional changes. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * gspawn: Reindent some argumentsPhilip Withnall2021-02-151-19/+19
| | | | | | | | | | | | | | They were indented incorrectly and I’m about to add some additional ones. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | Merge branch 'fix_more_warnings' into 'master'Philip Withnall2021-02-165-11/+14
|\ \ | | | | | | | | | | | | Fix more warnings See merge request GNOME/glib!1940
| * | Fix signedness warning in gio/gmemoryoutputstream.cEmmanuel Fleury2021-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | gio/gmemoryoutputstream.c: In function ‘g_memory_output_stream_seek’: gio/gmemoryoutputstream.c:792:44: error: comparison of integer expressions of different signedness: ‘goffset’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’} 792 | if (priv->realloc_fn == NULL && absolute > priv->len) | ^
| * | Fix signedness warning in gio/gdummyfile.cEmmanuel Fleury2021-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | gio/gdummyfile.c: In function ‘unescape_string’: gio/gdummyfile.c:485:32: error: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} 485 | g_warn_if_fail (out - result <= strlen (escaped_string)); | ^~
| * | Fix signedness warning in ↵Emmanuel Fleury2021-02-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gio/gbufferedinputstream.c:g_buffered_input_stream_seek() gio/gbufferedinputstream.c: In function ‘g_buffered_input_stream_seek’: gio/gbufferedinputstream.c:899:18: error: comparison of integer expressions of different signedness: ‘goffset’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’} 899 | if (offset <= priv->end - priv->pos && offset >= -priv->pos) | ^~ gio/gbufferedinputstream.c:899:53: error: comparison of integer expressions of different signedness: ‘goffset’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’} 899 | if (offset <= priv->end - priv->pos && offset >= -priv->pos) | ^~
| * | Fix signedness warnings in gio/gapplication-tool.cEmmanuel Fleury2021-02-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gio/gapplication-tool.c: In function ‘app_help’: glib/gmacros.h:806:26: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} gio/gapplication-tool.c:121:26: note: in expansion of macro ‘MAX’ 121 | maxwidth = MAX(maxwidth, strlen (_(substvars[i].var))); | ^~~ gio/gapplication-tool.c: In function ‘app_help’: glib/gmacros.h:806:26: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} gio/gapplication-tool.c:140:20: note: in expansion of macro ‘MAX’ 140 | maxwidth = MAX(maxwidth, strlen (topics[i].command)); | ^~~
| * | Fix missing initializer warnings in gio/gapplication-tool.cEmmanuel Fleury2021-02-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | gio/gapplication-tool.c:51:3: error: missing initializer for field ‘synopsis’ of ‘const struct help_topic’ 51 | }, | ^ gio/gapplication-tool.c:54:3: error: missing initializer for field ‘synopsis’ of ‘const struct help_topic’ 54 | }, | ^
| * | Fix several signedness warnings in gio/gapplication-tool.cEmmanuel Fleury2021-02-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gio/gapplication-tool.c: In function ‘app_help’: gio/gapplication-tool.c:90:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 90 | for (i = 0; i < G_N_ELEMENTS (topics); i++) | ^ gio/gapplication-tool.c:117:25: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 117 | for (i = 0; i < G_N_ELEMENTS (substvars); i++) | ^ gio/gapplication-tool.c:121:25: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 121 | for (i = 0; i < G_N_ELEMENTS (substvars); i++) | ^ gio/gapplication-tool.c:137:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 137 | for (i = 0; i < G_N_ELEMENTS (topics); i++) | ^ gio/gapplication-tool.c:140:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 140 | for (i = 0; i < G_N_ELEMENTS (topics); i++) | ^
| * | Fix signedness warning in gio/gdbus-tool.cEmmanuel Fleury2021-02-161-1/+1
|/ / | | | | | | | | | | gio/gdbus-tool.c:1183:95: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ 1183 | if ((fd_id = g_unix_fd_list_append (fd_list, g_variant_get_handle (value), &error)) == -1) | ^~
* | Merge branch '587-seek-behaviour' into 'master'Sebastian Dröge2021-02-162-66/+34
|\ \ | | | | | | | | | | | | | | | | | | ginputstream: Don’t skip off the end of resizable streams Closes #587 See merge request GNOME/glib!1952