Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7103158ybi; Thu, 13 Jun 2019 09:35:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmHvGFHvt4VGmyItN+2J8QObe+CNBiUSMMDZ8QRcjPwFKEafF8w0dHpnTO2cQO21Mwd1n7 X-Received: by 2002:a62:68c4:: with SMTP id d187mr96278859pfc.245.1560443751266; Thu, 13 Jun 2019 09:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560443751; cv=none; d=google.com; s=arc-20160816; b=NXqBZnHdwIY88NtNohkCAmYvOu/1mSBaICfUXjpWrYUqL2gbhEQo2Y2vWfzUVZki+a j4dOiqzfOp3NrKCfnLkLF2GrdI6Wxe2BrbVnBnBnzj/EUaFrxmw0v/iJn4WBCqxwjKXi 5kt4ezG74YoEyhaK/rzZ9sG+PSMSDP/3SJhZmoJYs9fW6t8Fns9S0U0iUri1sX5J+G7j YAd1HFkFCD35TdkaJ4R5p+5VLZI+oCvzIBwMvjIbtf8RM/ybNjR8aFGrGGIkgpfQOsMa TJLBlVfy0pZW8KPQdV49/i65NYbP3PXRiyRrNKP/cHes6YPAUNCh9MCFU3AAOQ5ZHSk8 7Zvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :mime-version:dkim-signature; bh=hotLWlJT65xEbJ61TV1i6ABCww+sxM3+UkKCRR2VvlQ=; b=YC7MQSUC9USOe8P0DXPeciwLVjLKfLbD1SzJfoa0vodDw0oaG0b/vvRq3lOJcGfsGm UanFJVEy3bmKfPLTLPeeeTS8UcbeNHvyMXRd/kUysGio899eP9hEZUvpaOFkvr7aa21H au9MJo98Bk5TAbQPUgxYt3fLUuCRJ33HWnURLQ70qZGeo0Yx1J7W2mkt7cz1V5UR8ENH aCW8uVFn9RyG2SrNokv1q4MPeho7sa75RvCCE3tzX+Leb+uQlfEb2CnTMZwTphQgHa2B lgveIFu109UaX7rup9hQRDjrPKmhfooZe2PaFk41XSihkOWwTsfWREdmFH0Kz8BD6JDh rycA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YG8USjoN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si79733pll.64.2019.06.13.09.35.36; Thu, 13 Jun 2019 09:35:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YG8USjoN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730843AbfFMQf1 (ORCPT + 99 others); Thu, 13 Jun 2019 12:35:27 -0400 Received: from mail-vs1-f50.google.com ([209.85.217.50]:40119 "EHLO mail-vs1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730724AbfFMHnd (ORCPT ); Thu, 13 Jun 2019 03:43:33 -0400 Received: by mail-vs1-f50.google.com with SMTP id a186so10111044vsd.7 for ; Thu, 13 Jun 2019 00:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=hotLWlJT65xEbJ61TV1i6ABCww+sxM3+UkKCRR2VvlQ=; b=YG8USjoNprxHuqspzE0bCI9G/czG9Bpmq8c13aybYyA2uPv6mGc4K/kxV4MKObBCXn VO+3wB0nSK56AukwJpc9eObDRy0A2QoLuOenXR7F19rKMHv1oprv0EJSU9/OSLYK+/Wi DtINoXmlSVoJSm0MdJn4WoLyREIFnkbXu66DmCl8r0+1jAaPvFRirQE3JcpguwggQTO3 rOUB3bIcW07qNreqZOk/9lUnR2zylA5EjK/TyuvsxZTOODEcKwebcMHh4Q0GnNy53JvS aCd51/jxleDuBriRwzn/g3axx6jkj6M8y3RW4XGcXLvGCkcO8MaoUzyBf+IanrvLpBZG ct4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hotLWlJT65xEbJ61TV1i6ABCww+sxM3+UkKCRR2VvlQ=; b=NjJFCdWfYAi7YDCA5h2S5daQYJPA2iDVHkKPIbkncAKuKtLc0ZEiv44+PG3UEY/p2p mb5A/R6Rp7hgkWyGjt748I32TnBS3Wmu+CbMcC2MZDtZryjvTDRQNEYZxcjsR47uxU16 SzWhqnm3e3vt4zcsSlkdJWQxtxPlRmJ4TqhsEOdtOh1DaVPAmE9TRQUdfbUKjzy4nFoE ObxtcLGMPIiYjp/mdwOgFa1ua9MYfY9+eaNBVG00cbyoguXYcwDCGEP6Jn+0zC/+P/Cs u0YCN5Ao4N4CFU9HuxkRXvADD57bmqUGxSfV3GT1oJBzfFo1r9teAba1snHW32rAdhOm gTkw== X-Gm-Message-State: APjAAAV83yJjg8wzdZ5KlGOKLtntEY04jHg9R9/I8QjbVDr+mCUtPtLT PsizCFJdBOlmvlRvjMPUec1cdFZ+KLD9bzGVz3n1zAskX0M= X-Received: by 2002:a67:ec5a:: with SMTP id z26mr43636516vso.144.1560411812380; Thu, 13 Jun 2019 00:43:32 -0700 (PDT) MIME-Version: 1.0 From: Pintu Agarwal Date: Thu, 13 Jun 2019 13:13:21 +0530 Message-ID: Subject: Pause a process execution from external program To: kernelnewbies@kernelnewbies.org, open list , pedro@palves.net Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, I was just wondering if this is possible in the Linux world. My requirement is: For some reason, I want to halt/pause the execution (for some specified time) of a running process/thread (at some location), without modified the source, may be by firing some events/signals from an another external program, by specifying the address location or a line number. Is this possible ? May be by using some system call, or other mechanism using the process PID. Assume that its a debugging system with all root privileges. Basically, its just like how "gdb" is able to set the break-point in a program, and able to stop its execution exactly at that location. I am wondering what mechanism "gdb" uses to do this? I tried to check here, but could find the exact place, where this is handled: https://github.com/bminor/binutils-gdb/blob/master/gdb/breakpoint.c Unfortunately, I cannot use "gdb", but I wanted to borrow this mechanism only to serve my purpose. If anyone is aware, please let me know. I will share my findings here, after I get some useful results of my experimentation. Thank you for your help! Regards, Pintu