File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 2
2
//!
3
3
//! Command line tool to manage bootable ostree-based containers.
4
4
5
+ use std:: ffi:: CString ;
5
6
use std:: ffi:: OsString ;
6
7
use std:: io:: Seek ;
7
8
use std:: os:: unix:: process:: CommandExt ;
@@ -796,6 +797,14 @@ async fn usroverlay() -> Result<()> {
796
797
/// Perform process global initialization. This should be called as early as possible
797
798
/// in the standard `main` function.
798
799
pub fn global_init ( ) -> Result < ( ) > {
800
+ // In some cases we re-exec with a temporary binary,
801
+ // so ensure that the syslog identifier is set.
802
+ let name = "bootc" ;
803
+ ostree:: glib:: set_prgname ( name. into ( ) ) ;
804
+ if let Err ( e) = rustix:: thread:: set_name ( & CString :: new ( name) . unwrap ( ) ) {
805
+ // This shouldn't ever happen
806
+ eprintln ! ( "failed to set name: {e}" ) ;
807
+ }
799
808
let am_root = rustix:: process:: getuid ( ) . is_root ( ) ;
800
809
// Work around bootc-image-builder not setting HOME, in combination with podman (really c/common)
801
810
// bombing out if it is unset.
You can’t perform that action at this time.
0 commit comments