Files
rust/library/std/src/sys/unix
Dylan DPC 0e8f0b03cd Rollup merge of #106001 - sdroege:glibc-skip-over-null-argv, r=ChrisDenton
Stop at the first `NULL` argument when iterating `argv`

Some C commandline parsers (e.g. GLib and Qt) are replacing already handled arguments in `argv` with `NULL` and move them to the end. That means that `argc` might be bigger than the actual number of non-`NULL` pointers in `argv` at this point.

To handle this we simply stop iterating at the first `NULL` argument.

`argv` is also guaranteed to be `NULL`-terminated so any non-`NULL` arguments after the first `NULL` can safely be ignored.

Fixes https://github.com/rust-lang/rust/issues/105999
2023-02-11 11:15:54 +05:30
..
2021-08-19 12:02:39 -07:00
2022-08-20 12:49:20 -04:00
2022-06-13 20:44:39 -07:00
2021-04-28 14:25:04 +02:00
2022-07-20 08:57:36 +01:00
2022-08-18 10:34:40 +01:00
2022-05-09 11:12:32 +02:00
2022-08-20 12:49:20 -04:00
2022-12-08 18:12:15 +05:30
2023-01-17 14:08:35 +01:00