From owner-freebsd-hackers@freebsd.org Wed Jul 8 16:35:13 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AD29366B69 for ; Wed, 8 Jul 2020 16:35:13 +0000 (UTC) (envelope-from damjan.jov@gmail.com) Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B24fS3gJvz4H0s for ; Wed, 8 Jul 2020 16:35:12 +0000 (UTC) (envelope-from damjan.jov@gmail.com) Received: by mail-il1-x135.google.com with SMTP id t4so26466846iln.1 for ; Wed, 08 Jul 2020 09:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gliRI1GCa6bUAXeRkSOMs+Rg4Wx7OoYTNSl8iivqR9s=; b=NoCAo9NRkuWkGTEha7m4Mssgrc9tMtJbIe835efWPgDW2ONFpv+ysY1oyzYe1yEq8Y 1v947fYMN6cDukeCbMvbdx1xqjuepMiCGzGdgFUsA5ASthrsQCOQwmJu7P+Y/sdq90r7 c5+ZAh7P8/l9DzNcohAxAHyqXU5KTu/UAMoaxwdPHE2jGCUCHIL3ThQE9Ch2a0a+SCih cwB4FV3zgmwwy150D0QHzvpCWeuzS2dqhvoZXvlcLfWx6oico3OsgENI8ajGxxgijdgH 7H3qPfHYRHNvA+09zwqRXpbvcH/tXjH0mdXn4nuCNg8obP8xaBOkLDJdC1snnvdWTWgL Ggfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gliRI1GCa6bUAXeRkSOMs+Rg4Wx7OoYTNSl8iivqR9s=; b=euc6gZUEPf0AWLyvxkZvxnrr5sosQZk+Ez6GTukAGSy2f8xPG0s64z7v7BDPJvJWdX R95VZgUWyXc94JdXhQkaWFwwqzQPa4frLAXqvfENvX9MDWnGIm//+twa3mePUxQAI+0t /SdEgTXLGlunGz78TZiG2j0dh3Ky8sMurbdyJ7CR4M6D7E1xVrD8QExs1a93TPqhVH2o PRQ68piIP61jydbQrc2HHML/msHpReHOYEiVEyJY8fl08vQ6h1QrXLqrOqBfXfmV3hra ui+L1NY7YeAigfPKXu38QumvtoVFtyplc5Nt6oLJ+BGiak80EpH99ebrcvCmCwqGc/uD ypFg== X-Gm-Message-State: AOAM5318yfIqQJfYWDGJmEvVdUGXBsiyjnxLkCBi/hKjsuES0UkbBWrE EjGQ6kzDQinB0IHJ7VZ1TLn5lhFzS9/hvb+XctErAllSSAE= X-Google-Smtp-Source: ABdhPJw1VEi/qDvzjTWmVeOVvo5j3kvlaqAUyEJS83LmGxIPPl4sXzKbm7Gnd3GqnjtD+j4up3rsTD3Q4EMurLInm6Y= X-Received: by 2002:a92:48da:: with SMTP id j87mr44593364ilg.197.1594226111363; Wed, 08 Jul 2020 09:35:11 -0700 (PDT) MIME-Version: 1.0 References: <21b0280d-c290-f27f-98a9-0c2242380718@rawbw.com> In-Reply-To: <21b0280d-c290-f27f-98a9-0c2242380718@rawbw.com> From: Damjan Jovanovic Date: Wed, 8 Jul 2020 18:33:11 +0200 Message-ID: Subject: Re: Is it possible to determine the open file path based on the file descriptor? To: Yuri Cc: Freebsd hackers list X-Rspamd-Queue-Id: 4B24fS3gJvz4H0s X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=NoCAo9NR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of damjanjov@gmail.com designates 2607:f8b0:4864:20::135 as permitted sender) smtp.mailfrom=damjanjov@gmail.com X-Spamd-Result: default: False [-2.09 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; NEURAL_HAM_LONG(-1.05)[-1.048]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::135:from]; NEURAL_HAM_SHORT(-0.05)[-0.051]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 16:35:13 -0000 On Wed, Jul 8, 2020 at 6:22 PM Yuri wrote: > Hi Hackers, > > > One of the ports (sysutils/watchman) attempts to find the path of the > file based on the file descriptor assuming that this descriptor > represents an open file. > > > Is this possible? > > procstat fd [pid] Damjan