]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/exec.c
pid namespaces: changes to show virtual ids to user
[net-next-2.6.git] / fs / exec.c
index 92d2703d87b2e0b2590a6af52a8d4829509f612d..007d0d814bf01953d5b780a35056f571ceb568dc 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1433,7 +1433,7 @@ static int format_corename(char *corename, const char *pattern, long signr)
                        case 'p':
                                pid_in_pattern = 1;
                                rc = snprintf(out_ptr, out_end - out_ptr,
-                                             "%d", current->tgid);
+                                             "%d", task_tgid_vnr(current));
                                if (rc > out_end - out_ptr)
                                        goto out;
                                out_ptr += rc;
@@ -1513,7 +1513,7 @@ static int format_corename(char *corename, const char *pattern, long signr)
        if (!ispipe && !pid_in_pattern
             && (core_uses_pid || atomic_read(&current->mm->mm_users) != 1)) {
                rc = snprintf(out_ptr, out_end - out_ptr,
-                             ".%d", current->tgid);
+                             ".%d", task_tgid_vnr(current));
                if (rc > out_end - out_ptr)
                        goto out;
                out_ptr += rc;