mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
always unlock mutex on errors
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# fastfetch
|
||||
|
||||
fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch) like tool for fetching system information and displaying them in a pretty way. It is written in c to achieve much better performance, in return only linux is supported.
|
||||
fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch) like tool for fetching system information and displaying them in a pretty way. It is written in c to achieve much better performance, in return only linux is supported. Additional it uses mechanismen like multithreading and caching to finish as fast as possible.
|
||||
|
||||
The output on my personal machine with default configurations looks like this:
|
||||

|
||||
|
||||
@@ -42,6 +42,7 @@ void ffCalculatePlasma(FFinstance* instance, FFstrbuf** themeNamePtr, FFstrbuf**
|
||||
if(kdeglobals == NULL)
|
||||
{
|
||||
ffStrbufDestroy(&kdeglobalsFile);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ void ffCalculateWM(FFinstance* instance, FFstrbuf** prettyNamePtr, FFstrbuf** pr
|
||||
if(proc == NULL)
|
||||
{
|
||||
ffStrbufSetS(&error, "opendir(\"/proc/\") == NULL");
|
||||
pthread_mutex_unlock(&mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,10 +65,7 @@ void ffCalculateWM(FFinstance* instance, FFstrbuf** prettyNamePtr, FFstrbuf** pr
|
||||
closedir(proc);
|
||||
|
||||
if(prettyName.length == 0)
|
||||
{
|
||||
ffStrbufSetS(&error, "No process name matches the name of known display managers");
|
||||
return;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user