tuliom / rpms / glibc

Forked from rpms/glibc 2 years ago
Clone

f6ed6cf Use rpm.execute() instead of an open-coded variant

Authored and Committed by zbyszek 2 years ago
1 file changed. 20 lines added. 20 lines removed.
    Use rpm.execute() instead of an open-coded variant
    
    See https://rpm-software-management.github.io/rpm/manual/lua.html and
    https://github.com/rpm-software-management/rpm/blob/298bb60a9fd5f2f35c57353d8724460004723c4a/rpmio/rpmlua.c#L806-L829
    
    assert() is not used because it seems better to ignore the error.  The
    old code would assert on exec(), but not on fork(), and it would not
    check the return value either. But if the call fails (for any reason),
    an error is printed. At least iconvconfig just seems to fail quietly
    in case of a problem.
    
        
file modified
+20 -20