openbsd-ports/audio/ncmpcpp/patches/patch-src_status_cpp
dcoppa 60060e8d62 - Check return values of system() calls (stolen from ubuntu)
- Fix manpage errors and remove USE_GROFF
2012-10-25 13:43:42 +00:00

17 lines
635 B
Plaintext

$OpenBSD: patch-src_status_cpp,v 1.3 2012/10/25 13:43:42 dcoppa Exp $
Check return values of system() call
--- src/status.cpp.orig Sun Apr 1 18:49:09 2012
+++ src/status.cpp Thu Oct 25 15:14:57 2012
@@ -401,7 +401,8 @@ void NcmpcppStatusChanged(MPD::Connection *, MPD::Stat
if (myPlaylist->isPlaying())
{
if (!Config.execute_on_song_change.empty())
- system(Config.execute_on_song_change.c_str());
+ if (system(Config.execute_on_song_change.c_str()) < 0)
+ ShowMessage("Couldn't execute \"%s\"", Config.execute_on_song_change.c_str());
# ifdef HAVE_CURL_CURL_H
if (Config.fetch_lyrics_in_background)