mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 03:53:18 +00:00
lxc: Distinguish pthread_mutex_unlock error messages
The same message exists in lxclock.c and cgmanager.c, so print the filename along with the message. Before this patch: lxc-destroy -n u1 pthread_mutex_unlock returned:1 Operation not permitted After this patch: xc-destroy -n u1 lxclock.c: pthread_mutex_unlock returned:1 Operation not permitted Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
This commit is contained in:
parent
f6812e7f2e
commit
81a14ca944
@ -88,7 +88,8 @@ static void unlock_mutex(pthread_mutex_t *l)
|
||||
int ret;
|
||||
|
||||
if ((ret = pthread_mutex_unlock(l)) != 0) {
|
||||
fprintf(stderr, "pthread_mutex_unlock returned:%d %s\n", ret, strerror(ret));
|
||||
fprintf(stderr, "%s: pthread_mutex_unlock returned:%d %s\n",
|
||||
__FILE__, ret, strerror(ret));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,8 @@ static void unlock_mutex(pthread_mutex_t *l)
|
||||
int ret;
|
||||
|
||||
if ((ret = pthread_mutex_unlock(l)) != 0) {
|
||||
fprintf(stderr, "pthread_mutex_unlock returned:%d %s\n", ret, strerror(ret));
|
||||
fprintf(stderr, "%s: pthread_mutex_unlock returned:%d %s\n",
|
||||
__FILE__, ret, strerror(ret));
|
||||
dump_stacktrace();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user