* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/ .
+ * along with this program. If not, see https://www.gnu.org/licenses/ .
*
* Author: Chris Wilson <chris@chris-wilson.co.uk>
*/
#define RUNNING_ON_VALGRIND 0
#endif
-notmuch_bool_t
+bool
debugger_is_active (void)
{
char buf[1024];
+ char buf2[1024];
if (RUNNING_ON_VALGRIND)
- return TRUE;
+ return true;
sprintf (buf, "/proc/%d/exe", getppid ());
- if (readlink (buf, buf, sizeof (buf)) != -1 &&
- strncmp (basename (buf), "gdb", 3) == 0)
+ if (readlink (buf, buf2, sizeof (buf2)) != -1 &&
+ strncmp (basename (buf2), "gdb", 3) == 0)
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}