File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -630,7 +630,12 @@ sinsp_threadinfo* sinsp_threadinfo::get_cwd_root()
630630
631631string sinsp_threadinfo::get_cwd ()
632632{
633- sinsp_threadinfo* tinfo = get_cwd_root ();
633+ // Ideally we should use get_cwd_root()
634+ // but scap does not read CLONE_FS from /proc
635+ // Also glibc and muslc use always
636+ // CLONE_THREAD|CLONE_FS so let's use
637+ // get_main_thread() for now
638+ sinsp_threadinfo* tinfo = get_main_thread ();
634639
635640 if (tinfo)
636641 {
@@ -646,7 +651,7 @@ string sinsp_threadinfo::get_cwd()
646651void sinsp_threadinfo::set_cwd (const char * cwd, uint32_t cwdlen)
647652{
648653 char tpath[SCAP_MAX_PATH_SIZE];
649- sinsp_threadinfo* tinfo = get_cwd_root ();
654+ sinsp_threadinfo* tinfo = get_main_thread ();
650655
651656 if (tinfo)
652657 {
You can’t perform that action at this time.
0 commit comments