Skip to content

Commit

Permalink
fix indentations
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerZhongAWS committed Apr 5, 2022
1 parent c2d998b commit b032532
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions source/util/LockFileUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,30 @@ namespace Aws
*/
class LockFileUtils
{
private:
static constexpr char TAG[] = "LockFileUtils.cpp";
static constexpr char FILE_NAME[] = "/var/run/devicecl.lock";
static constexpr char PROCESS_NAME[] = "aws-iot-device-client";
private:
static constexpr char TAG[] = "LockFileUtils.cpp";
static constexpr char FILE_NAME[] = "/var/run/devicecl.lock";
static constexpr char PROCESS_NAME[] = "aws-iot-device-client";

/**
* \brief Gives the current process exclusive write access and writes the pid into the lock file
* @param pid
*/
static void WriteToLockFile(const std::string &pid);
/**
* \brief Gives the current process exclusive write access and writes the pid into the lock file
* @param pid
*/
static void WriteToLockFile(const std::string &pid);

public:
/**
* \brief Creates a lock file in the default directory if it does not exist, aborts execution if another process is running.
* @return 0 upon success
*/
static int ProcessLock();
public:
/**
* \brief Creates a lock file in the default directory if it does not exist, aborts execution if
* another process is running.
* @return 0 upon success
*/
static int ProcessLock();

/**
* \brief Deletes the lock file when device client shuts down
* @return 0 upon success
*/
static int ProcessUnlock();
/**
* \brief Deletes the lock file when device client shuts down
* @return 0 upon success
*/
static int ProcessUnlock();
};
} // namespace Util
} // namespace DeviceClient
Expand Down

0 comments on commit b032532

Please sign in to comment.