<commit_before>/** \file    ProcessUtil.h
 *  \brief   The ProcessUtil interface.
 *  \author  Dr. <NAME>
 */

/*
 *  Copyright 2020 University Library of Tübingen
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#pragma once


#include <string>
#include <unordered_set>
#include <sys/types.h>


namespace ProcessUtil {


/** \return  The list of PID's that have an open file descripto for "path".
 *  \note    Does currently not include memory-mapped files!
 *  \warning This is not an atomic operation!
 */
std::unordered_set<pid_t> GetProcessIdsForPath(const std::string &path);


} // namespace ProcessUtil<commit_msg>Fixed a typo.<commit_after>/** \file    ProcessUtil.h
 *  \brief   The ProcessUtil interface.
 *  \author  Dr. <NAME>
 */

/*
 *  Copyright 2020 University Library of Tübingen
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#pragma once


#include <string>
#include <unordered_set>
#include <sys/types.h>


namespace ProcessUtil {


/** \return  The list of PID's that have an open file descriptor for "path".
 *  \note    Does currently not include memory-mapped files!
 *  \warning This is not an atomic operation!
 */
std::unordered_set<pid_t> GetProcessIdsForPath(const std::string &path);


} // namespace ProcessUtil
{'fraction_non_alphanumeric': 0.08151093439363817, 'fraction_numerical': 0.003976143141153081, 'mean_word_length': 3.5251798561151078, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7293764', 'n_tokens_mistral': 716, 'n_tokens_neox': 694, 'n_words': 323}